Class AbstractMarshaller

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput, java.lang.AutoCloseable, ByteOutput, Marshaller
    Direct Known Subclasses:
    RiverMarshaller, SerialMarshaller

    public abstract class AbstractMarshaller
    extends AbstractObjectOutput
    implements Marshaller
    An abstract implementation of the Marshaller interface. Most of the write methods delegate directly to the current data output.
    • Field Detail

      • classExternalizerFactory

        protected final ClassExternalizerFactory classExternalizerFactory
        The configured class externalizer factory.
      • streamHeader

        protected final StreamHeader streamHeader
        The configured stream header.
      • classResolver

        protected final ClassResolver classResolver
        The configured class resolver.
      • objectResolver

        protected final ObjectResolver objectResolver
        The configured object resolver.
      • objectPreResolver

        protected final ObjectResolver objectPreResolver
        The configured pre object resolver.
      • classTable

        protected final ClassTable classTable
        The configured class table.
      • objectTable

        protected final ObjectTable objectTable
        The configured object table.
      • exceptionListener

        protected final ExceptionListener exceptionListener
        The configured exception listener.
      • serializabilityChecker

        protected final SerializabilityChecker serializabilityChecker
        The configured serializability checker.
      • configuredVersion

        protected final int configuredVersion
        The configured version to write.
    • Constructor Detail

      • AbstractMarshaller

        protected AbstractMarshaller​(AbstractMarshallerFactory marshallerFactory,
                                     MarshallingConfiguration configuration)
        Construct a new marshaller instance.
        Parameters:
        marshallerFactory - the marshaller factory
        configuration -
    • Method Detail

      • start

        public void start​(ByteOutput byteOutput)
                   throws java.io.IOException
        Begin writing to a stream.
        Specified by:
        start in interface Marshaller
        Overrides:
        start in class SimpleDataOutput
        Parameters:
        byteOutput - the new stream
        Throws:
        java.io.IOException - if an error occurs
      • writeObject

        public final void writeObject​(java.lang.Object obj)
                               throws java.io.IOException
        Specified by:
        writeObject in interface java.io.ObjectOutput
        Overrides:
        writeObject in class AbstractObjectOutput
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.io.ObjectOutput
        Overrides:
        close in class SimpleDataOutput
        Throws:
        java.io.IOException