Package org.jboss.marshalling
Interface Marshaller
- All Superinterfaces:
AutoCloseable
,ByteOutput
,Closeable
,DataOutput
,Flushable
,ObjectOutput
- All Known Implementing Classes:
AbstractMarshaller
,BlockMarshaller
,BlockMarshaller
,ObjectOutputStreamMarshaller
,RiverMarshaller
,SerializingCloner.StepObjectOutput
,SerialMarshaller
An object marshaller for writing objects to byte streams.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Discard the class cache.void
Discard the instance cache.void
finish()
Finish marshalling to a stream.void
start
(ByteOutput newOutput) Begin marshalling to a stream.void
Write an object to the underlying storage or stream as a new instance.Methods inherited from interface org.jboss.marshalling.ByteOutput
write, write, write
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
Methods inherited from interface java.io.ObjectOutput
close, flush, write, write, write, writeObject
-
Method Details
-
start
Begin marshalling to a stream.- Parameters:
newOutput
- the new stream- Throws:
IOException
- if an error occurs during setup, such as an error writing the header
-
clearInstanceCache
Discard the instance cache. May also discard the class cache in implementations that do not support separated class and instance caches.- Throws:
IOException
- if an error occurs
-
clearClassCache
Discard the class cache. Implicitly also discards the instance cache.- Throws:
IOException
- if an error occurs
-
finish
Finish 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:
IOException
- if an error occurs