Interface Marshaller

    • Method Detail

      • writeObjectUnshared

        void writeObjectUnshared​(Object obj)
                          throws IOException
        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 - the object to be written
        Throws:
        IOException - if an error occurs
      • start

        void start​(ByteOutput newOutput)
            throws IOException
        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

        void clearInstanceCache()
                         throws IOException
        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

        void clearClassCache()
                      throws IOException
        Discard the class cache. Implicitly also discards the instance cache.
        Throws:
        IOException - if an error occurs
      • finish

        void finish()
             throws IOException
        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.
        Throws:
        IOException - if an error occurs