Top Description Fields Constructors Methods
org.jboss.marshalling

public abstract Class AbstractMarshaller

extends AbstractObjectOutput
implements Marshaller
Class Inheritance
All Implemented Interfaces
org.jboss.marshalling.Marshaller, org.jboss.marshalling.ByteOutput, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable, java.io.ObjectOutput, java.io.DataOutput
Imports
java.io.IOException

An abstract implementation of the Marshaller interface. Most of the write methods delegate directly to the current data output.

Field Summary

Modifier and TypeField and Description
protected final ClassExternalizerFactory
classExternalizerFactory

The configured class externalizer factory.

protected final ClassResolver
classResolver

The configured class resolver.

protected final ClassTable
classTable

The configured class table.

protected final int
configuredVersion

The configured version to write.

protected final ExceptionListener
exceptionListener

The configured exception listener.

protected final ObjectResolver
objectPreResolver

The configured pre object resolver.

protected final ObjectResolver
objectResolver

The configured object resolver.

protected final ObjectTable
objectTable

The configured object table.

protected final SerializabilityChecker
serializabilityChecker

The configured serializability checker.

protected final StreamHeader
streamHeader

The configured stream header.

Constructor Summary

AccessConstructor and Description
protected
AbstractMarshaller(final AbstractMarshallerFactory
the marshaller factory
marshallerFactory
,
final MarshallingConfiguration configuration)

Construct a new marshaller instance.

Method Summary

Modifier and TypeMethod and Description
private static int
calcBufferSize(final AbstractMarshallerFactory marshallerFactory, final MarshallingConfiguration configuration)

public void
public void
public void
start(final ByteOutput
the new stream
byteOutput
)

Overrides org.jboss.marshalling.SimpleDataOutput.start.

Implements org.jboss.marshalling.Marshaller.start.

Begin marshalling to a stream.
public final void
writeObject(final Object
the object to be written
obj
)

Overrides org.jboss.marshalling.AbstractObjectOutput.writeObject.

Implements java.io.ObjectOutput.writeObject.

Write an object to the underlying storage or stream.
public final void
writeObjectUnshared(final Object
the object to be written
obj
)

Overrides org.jboss.marshalling.AbstractObjectOutput.writeObjectUnshared.

Implements org.jboss.marshalling.Marshaller.writeObjectUnshared.

Write an object to the underlying storage or stream as a new instance.
Inherited from org.jboss.marshalling.AbstractObjectOutput:
doWriteObject

Field Detail

classExternalizerFactoryback to summary
protected final ClassExternalizerFactory classExternalizerFactory

The configured class externalizer factory.

classResolverback to summary
protected final ClassResolver classResolver

The configured class resolver.

classTableback to summary
protected final ClassTable classTable

The configured class table.

configuredVersionback to summary
protected final int configuredVersion

The configured version to write.

exceptionListenerback to summary
protected final ExceptionListener exceptionListener

The configured exception listener.

objectPreResolverback to summary
protected final ObjectResolver objectPreResolver

The configured pre object resolver.

objectResolverback to summary
protected final ObjectResolver objectResolver

The configured object resolver.

objectTableback to summary
protected final ObjectTable objectTable

The configured object table.

serializabilityCheckerback to summary
protected final SerializabilityChecker serializabilityChecker

The configured serializability checker.

streamHeaderback to summary
protected final StreamHeader streamHeader

The configured stream header.

Constructor Detail

AbstractMarshallerback to summary
protected AbstractMarshaller(final AbstractMarshallerFactory marshallerFactory, final MarshallingConfiguration configuration)

Construct a new marshaller instance.

Parameters
marshallerFactory:AbstractMarshallerFactory

the marshaller factory

Method Detail

calcBufferSizeback to summary
private static int calcBufferSize(final AbstractMarshallerFactory marshallerFactory, final MarshallingConfiguration configuration)
closeback to summary
public void close() throws IOException

Overrides org.jboss.marshalling.SimpleDataOutput.close.

Implements java.io.ObjectOutput.close, java.io.Closeable.close.

Doc from java.io.ObjectOutput.close.

Closes the stream. This method must be called to release any resources associated with the stream.

Exceptions
IOException:
If an I/O error has occurred.
finishback to summary
public void finish() throws IOException

Overrides org.jboss.marshalling.SimpleDataOutput.finish.

Implements org.jboss.marshalling.Marshaller.finish.

Doc from org.jboss.marshalling.Marshaller.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 the start(ByteOutput) method is again invoked.

Exceptions
IOException:
if an error occurs
startback to summary
public void start(final ByteOutput byteOutput) throws IOException

Overrides org.jboss.marshalling.SimpleDataOutput.start.

Implements org.jboss.marshalling.Marshaller.start.

Doc from org.jboss.marshalling.Marshaller.start.

Begin marshalling to a stream.

Parameters
byteOutput:ByteOutput

the new stream

Exceptions
IOException:
if an error occurs during setup, such as an error writing the header
writeObjectback to summary
public final void writeObject(final Object obj) throws IOException

Overrides org.jboss.marshalling.AbstractObjectOutput.writeObject.

Implements java.io.ObjectOutput.writeObject.

Doc from java.io.ObjectOutput.writeObject.

Write an object to the underlying storage or stream. The class that implements this interface defines how the object is written.

Parameters
obj:Object

the object to be written

Exceptions
IOException:
Any of the usual Input/Output related exceptions.
writeObjectUnsharedback to summary
public final void writeObjectUnshared(final Object obj) throws IOException

Overrides org.jboss.marshalling.AbstractObjectOutput.writeObjectUnshared.

Implements org.jboss.marshalling.Marshaller.writeObjectUnshared.

Doc from org.jboss.marshalling.Marshaller.writeObjectUnshared.

Write 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:Object

the object to be written

Exceptions
IOException:
if an error occurs