Class WrapperObjectOutputStream

All Implemented Interfaces:
com.oracle.coherence.common.io.OutputStreaming, OutputStreaming, Closeable, DataOutput, Flushable, ObjectOutput, AutoCloseable
Direct Known Subclasses:
ExternalizableHelper.ShieldedObjectOutputStream

public class WrapperObjectOutputStream extends WrapperDataOutputStream implements ObjectOutput
This is an imitation ObjectOutputStream class that provides the ObjectOutput interface by delegating to an object that implements the ObjectOutput interface. Primarily, this is intended as a base class for building specific-purpose ObjectOutput wrappers.
Author:
cp 2004.08.20
  • Constructor Details

    • WrapperObjectOutputStream

      public WrapperObjectOutputStream(ObjectOutput out)
      Construct a WrapperObjectOutputStream that will output to the specified object implementing the ObjectOutput interface.
      Parameters:
      out - an object implementing ObjectOutput to write to
  • Method Details

    • getObjectOutput

      public ObjectOutput getObjectOutput()
      Obtain the underlying object providing the ObjectOutput interface that this object is delegating to.
      Returns:
      the underlying ObjectOutput
    • getBytesWritten

      public long getBytesWritten()
      Return the total number of bytes written to the wrapped DataOutput object.

      This method is unsupported.

      Overrides:
      getBytesWritten in class WrapperDataOutputStream
      Returns:
      the total number of bytes written
      Throws:
      UnsupportedOperationException - always
    • writeObject

      public void writeObject(Object o) throws IOException
      Writes the Object o so that the corresponding ObjectInput.readObject() method can reconstitute an Object from the written data.
      Specified by:
      writeObject in interface ObjectOutput
      Parameters:
      o - the Object to write
      Throws:
      IOException - if an I/O error occurs