|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.marshal.serializable.SerializableUnMarshaller
org.jboss.remoting.marshal.compress.CompressingUnMarshaller
public class CompressingUnMarshaller
CompressingMarshaller
and CompressingUnMarshaller
are a general
purpose compressing marshaller / decompressing unmarshaller pair based on Java's GZIP facilities.
CompressingUnMarshaller
is subclassed from SerializableUnMarshaller
,
and by default it uses super.read()
to deserialize an object, once the object has been
uncompressed. Optionally, it can wrap any other unmarshaller and use that instead of
SerializableUnMarshaller
to unmarshall an uncompressed input stream. For example,
new CompressingUnMarshaller(new HTTPUnMarshaller())
HTTPUnMarshaller
to restore an uncompressed input stream.
Field Summary | |
---|---|
static java.lang.String |
DATATYPE
|
Fields inherited from class org.jboss.remoting.marshal.serializable.SerializableUnMarshaller |
---|
customClassLoader, serializationType |
Constructor Summary | |
---|---|
CompressingUnMarshaller()
Create a new CompressingUnMarshaller. |
|
CompressingUnMarshaller(UnMarshaller unMarshaller)
Create a new CompressingUnMarshaller. |
Method Summary | |
---|---|
UnMarshaller |
cloneUnMarshaller()
Returns a new CompressingUnMarshaller |
java.io.InputStream |
getMarshallingStream(java.io.InputStream inputStream)
An application that calls getMarshallingStream() should provide a basic InpputStream, e.g., SocketIntputStream, which can be wrapped to provide the facilities desired by the PreferredStreamUnMarshaller. |
java.lang.Object |
read(java.io.InputStream inputStream,
java.util.Map metadata,
int version)
Restores a compressed, marshalled form of an object to its original state. |
Methods inherited from class org.jboss.remoting.marshal.serializable.SerializableUnMarshaller |
---|
getClassLoader, getMarshallingStream, getSerializationType, read, setClassLoader, setSerializationType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATATYPE
Constructor Detail |
---|
public CompressingUnMarshaller()
public CompressingUnMarshaller(UnMarshaller unMarshaller)
unMarshaller
- unmarshaller to be used to restore uncompressed byte stream to original objectMethod Detail |
---|
public java.io.InputStream getMarshallingStream(java.io.InputStream inputStream) throws java.io.IOException
PreferredStreamUnMarshaller
getMarshallingStream
in interface PreferredStreamUnMarshaller
getMarshallingStream
in class SerializableUnMarshaller
inputStream
- a raw IntputStream
java.io.IOException
- if unable to create InputStreampublic java.lang.Object read(java.io.InputStream inputStream, java.util.Map metadata, int version) throws java.io.IOException, java.lang.ClassNotFoundException
read
in interface VersionedUnMarshaller
read
in class SerializableUnMarshaller
inputStream
- InputStream
from which marshalled form is to be retrievedmetadata
- can be any transport specific metadata (such as headers from http transport).
This can be null, depending on if transport supports metadata.version
- wire format version
java.io.IOException
- if there is a problem reading from inputStream
java.lang.ClassNotFoundException
- if there is a problem finding a class needed for unmarshallingpublic UnMarshaller cloneUnMarshaller() throws java.lang.CloneNotSupportedException
CompressingUnMarshaller
cloneUnMarshaller
in interface UnMarshaller
cloneUnMarshaller
in class SerializableUnMarshaller
CompressingUnMarshaller
java.lang.CloneNotSupportedException
- In practice no exceptions are thrown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |