Package org.jboss.marshalling
Interface Marshaller
-
- All Superinterfaces:
java.lang.AutoCloseable,ByteOutput,java.io.Closeable,java.io.DataOutput,java.io.Flushable,java.io.ObjectOutput
- All Known Implementing Classes:
AbstractMarshaller,BlockMarshaller,BlockMarshaller,ObjectOutputStreamMarshaller,RiverMarshaller,SerializingCloner.StepObjectOutput,SerialMarshaller
public interface Marshaller extends java.io.ObjectOutput, ByteOutput
An object marshaller for writing objects to byte streams.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearClassCache()Discard the class cache.voidclearInstanceCache()Discard the instance cache.voidfinish()Finish marshalling to a stream.voidstart(ByteOutput newOutput)Begin marshalling to a stream.voidwriteObjectUnshared(java.lang.Object obj)Write an object to the underlying storage or stream as a new instance.-
Methods inherited from interface org.jboss.marshalling.ByteOutput
write, write, write
-
-
-
-
Method Detail
-
writeObjectUnshared
void writeObjectUnshared(java.lang.Object obj) throws java.io.IOExceptionWrite an object to the underlying storage or stream as a new instance. The class that implements this interface defines how the object is written.- Parameters:
obj- the object to be written- Throws:
java.io.IOException- if an error occurs
-
start
void start(ByteOutput newOutput) throws java.io.IOException
Begin marshalling to a stream.- Parameters:
newOutput- the new stream- Throws:
java.io.IOException- if an error occurs during setup, such as an error writing the header
-
clearInstanceCache
void clearInstanceCache() throws java.io.IOExceptionDiscard the instance cache. May also discard the class cache in implementations that do not support separated class and instance caches.- Throws:
java.io.IOException- if an error occurs
-
clearClassCache
void clearClassCache() throws java.io.IOExceptionDiscard the class cache. Implicitly also discards the instance cache.- Throws:
java.io.IOException- if an error occurs
-
finish
void finish() throws java.io.IOExceptionFinish marshalling to a stream. Any transient class or instance cache is discarded. The stream is released. No further marshalling may be done until thestart(ByteOutput)method is again invoked.- Throws:
java.io.IOException- if an error occurs
-
-