|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.marshal.serializable.SerializableMarshaller
org.jboss.remoting.marshal.compress.CompressingMarshaller
public class CompressingMarshaller
CompressingMarshaller
and CompressingUnMarshaller
are a general
purpose compressing marshaller / decompressing unmarshaller pair based on Java's GZIP facilities.
CompressingMarshaller
is subclassed from SerializableMarshaller
, and by default
it uses super.write()
to marshall an object, which is then
compressed. Optionally, it can wrap any other marshaller and use that instead of
SerializableMarshaller
to marshall an object before it is compressed. For example,
new CompressingMarshaller(new HTTPMarshaller())
HTTPMarshaller
.
Field Summary | |
---|---|
static java.lang.String |
DATATYPE
|
Constructor Summary | |
---|---|
CompressingMarshaller()
Create a new CompressingMarshaller. |
|
CompressingMarshaller(Marshaller marshaller)
Create a new CompressingMarshaller. |
Method Summary | |
---|---|
Marshaller |
cloneMarshaller()
Returns a CompressingMarshaller . |
java.io.OutputStream |
getMarshallingStream(java.io.OutputStream outputStream)
An application that calls getMarshallingStream() should provide a basic OutputStream, e.g., SocketOutputStream, which can be wrapped to provide the facilities desired by the PreferredStreamMarshaller. |
void |
write(java.lang.Object dataObject,
java.io.OutputStream output,
int version)
Writes compressed, marshalled form of dataObject to output . |
Methods inherited from class org.jboss.remoting.marshal.serializable.SerializableMarshaller |
---|
getMarshallingStream, getSerializationType, setSerializationType, write |
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 CompressingMarshaller()
public CompressingMarshaller(Marshaller marshaller)
marshaller
- A Marshaller
which is used to turn objects into byte streams.Method Detail |
---|
public java.io.OutputStream getMarshallingStream(java.io.OutputStream outputStream) throws java.io.IOException
PreferredStreamMarshaller
getMarshallingStream
in interface PreferredStreamMarshaller
getMarshallingStream
in class SerializableMarshaller
outputStream
- a raw OutputStream
java.io.IOException
- if it unable to create OutputStreampublic void write(java.lang.Object dataObject, java.io.OutputStream output, int version) throws java.io.IOException
dataObject
to output
.
write
in interface VersionedMarshaller
write
in class SerializableMarshaller
dataObject
- arbitrary object to be marshalledoutput
- OutputStream
to which output
is to be marshalledversion
- wire format version
java.io.IOException
public Marshaller cloneMarshaller() throws java.lang.CloneNotSupportedException
CompressingMarshaller
.
cloneMarshaller
in interface Marshaller
cloneMarshaller
in class SerializableMarshaller
CompressingMarshaller
.
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 |