org.jboss.remoting.loading
Class CompressedClassBytes
java.lang.Object
org.jboss.remoting.loading.ClassBytes (src)
org.jboss.remoting.loading.CompressedClassBytes
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
- public class CompressedClassBytes
- extends ClassBytes (src)
- implements java.io.Externalizable
CompressedClassBytes is a ClassBytes subclass that compresses
class data, if possible.
- See Also:
- Serialized Form
Method Summary |
byte[] |
compress(byte[] input)
Compresses the input data. |
static void |
main(java.lang.String[] args)
|
void |
readExternal(java.io.ObjectInput in)
|
byte[] |
uncompress(byte[] input)
Un-compresses the input data. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CompressedClassBytes
public CompressedClassBytes()
CompressedClassBytes
public CompressedClassBytes(java.lang.String className,
byte[] data,
int compressionLevel)
main
public static void main(java.lang.String[] args)
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
compress
public byte[] compress(byte[] input)
- Compresses the input data.
- Returns:
- null if compression results in larger output.
uncompress
public byte[] uncompress(byte[] input)
throws java.io.IOException
- Un-compresses the input data.
- Throws:
java.io.IOException
- if the input is not valid.