Package org.jboss.marshalling
Class AbstractMarshaller
java.lang.Object
java.io.OutputStream
org.jboss.marshalling.SimpleByteOutput
org.jboss.marshalling.ByteOutputStream
org.jboss.marshalling.SimpleDataOutput
org.jboss.marshalling.AbstractObjectOutput
org.jboss.marshalling.AbstractMarshaller
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,ObjectOutput,AutoCloseable,ByteOutput,Marshaller
An abstract implementation of the
Marshaller interface. Most of the
write methods delegate directly to the current data output.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ClassExternalizerFactoryThe configured class externalizer factory.protected final ClassResolverThe configured class resolver.protected final ClassTableThe configured class table.protected final intThe configured version to write.protected final ExceptionListenerThe configured exception listener.protected final ObjectResolverThe configured pre object resolver.protected final ObjectResolverThe configured object resolver.protected final ObjectTableThe configured object table.protected final SerializabilityCheckerThe configured serializability checker.protected final StreamHeaderThe configured stream header.Fields inherited from class org.jboss.marshalling.SimpleDataOutput
buffer, bufferSizeFields inherited from class org.jboss.marshalling.ByteOutputStream
byteOutput -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMarshaller(AbstractMarshallerFactory marshallerFactory, MarshallingConfiguration configuration) Construct a new marshaller instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfinish()Finish writing to a stream.voidstart(ByteOutput byteOutput) Begin writing to a stream.final voidwriteObject(Object obj) final voidMethods inherited from class org.jboss.marshalling.AbstractObjectOutput
doWriteObjectMethods inherited from class org.jboss.marshalling.SimpleDataOutput
flush, shallowFlush, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.marshalling.ByteOutput
write, write, writeMethods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFMethods inherited from interface org.jboss.marshalling.Marshaller
clearClassCache, clearInstanceCacheMethods inherited from interface java.io.ObjectOutput
flush, write, write, write
-
Field Details
-
classExternalizerFactory
The configured class externalizer factory. -
streamHeader
The configured stream header. -
classResolver
The configured class resolver. -
objectResolver
The configured object resolver. -
objectPreResolver
The configured pre object resolver. -
classTable
The configured class table. -
objectTable
The configured object table. -
exceptionListener
The configured exception listener. -
serializabilityChecker
The configured serializability checker. -
configuredVersion
protected final int configuredVersionThe configured version to write.
-
-
Constructor Details
-
AbstractMarshaller
protected AbstractMarshaller(AbstractMarshallerFactory marshallerFactory, MarshallingConfiguration configuration) Construct a new marshaller instance.- Parameters:
marshallerFactory- the marshaller factoryconfiguration-
-
-
Method Details
-
start
Begin writing to a stream.- Specified by:
startin interfaceMarshaller- Overrides:
startin classSimpleDataOutput- Parameters:
byteOutput- the new stream- Throws:
IOException- if an error occurs
-
writeObject
- Specified by:
writeObjectin interfaceObjectOutput- Overrides:
writeObjectin classAbstractObjectOutput- Throws:
IOException
-
finish
Finish writing to a stream. The stream is released. No further writing may be done until theSimpleDataOutput.start(ByteOutput)method is again invoked.- Specified by:
finishin interfaceMarshaller- Overrides:
finishin classSimpleDataOutput- Throws:
IOException- if an error occurs
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectOutput- Overrides:
closein classSimpleDataOutput- Throws:
IOException
-