|
原帖由 〇〇 于 2009-6-12 09:13 发表 ![]()
create or replace java source named UNWRAPPER
as
import java.io.*;
import java.util.zip.*;
public class UNWRAPPER
{
public static String Inflate( byte[] src )
{
try
{
ByteArrayInputStream bis = new ByteArrayInputStream( src );
InflaterInputStream iis = new InflaterInputStream( bis );
StringBuffer sb = new StringBuffer();
for( int c = iis.read(); c != -1; c = iis.read() )
{
sb.append( (char) c );
}
String hello = new String(sb.toString().getBytes("iso8859-1"), "GBK");
return hello;
} catch ( Exception e )
{
}
return null;
}
public static byte[] Deflate( String src, int quality )
{
try
{
byte[] tmp = new byte[ src.length() + 100 ];
Deflater defl = new Deflater( quality );
defl.setInput( src.getBytes( "UTF-8" ) );
defl.finish();
int cnt = defl.deflate( tmp );
byte[] res = new byte[ cnt ];
for( int i = 0; i < cnt; i++ )
res = tmp;
return res;
} catch ( Exception e )
{
}
return null;
}
}
/
alter java source UNWRAPPER compile
/
conn sys/sys@orcl as sysdba
set lines 132 pages 50000 timi on
set serverout on
exec unwrap('SYS','HANMON','PACKAGE BODY');
ORA-29536: badly formed source: java.lang.NoClassDefFoundError
这个应该怎么解决呢? |
|