Oracle® Coherence Java API Reference
v3.5

E14977-01

com.tangosol.io
Class WrapperObjectOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.tangosol.io.WrapperDataOutputStream
          extended by com.tangosol.io.WrapperObjectOutputStream
All Implemented Interfaces:
OutputStreaming, java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput

public class WrapperObjectOutputStream
extends WrapperDataOutputStream
implements java.io.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 Summary
WrapperObjectOutputStream(java.io.ObjectOutput out)
          Construct a WrapperObjectOutputStream that will output to the specified object implementing the ObjectOutput interface.
 
Method Summary
 long getBytesWritten()
          Return the total number of bytes written to the wrapped DataOutput object.
 java.io.ObjectOutput getObjectOutput()
          Obtain the underlying object providing the ObjectOutput interface that this object is delegating to.
 void writeObject(java.lang.Object o)
          Writes the Object o so that the corresponding ObjectInput.readObject() method can reconstitute an Object from the written data.
 
Methods inherited from class com.tangosol.io.WrapperDataOutputStream
close, flush, getDataOutput, incBytesWritten, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from interface java.io.ObjectOutput
close, flush, write, write, write
 
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 

Constructor Detail

WrapperObjectOutputStream

public WrapperObjectOutputStream(java.io.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 Detail

getObjectOutput

public java.io.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:
java.lang.UnsupportedOperationException

writeObject

public void writeObject(java.lang.Object o)
                 throws java.io.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 java.io.ObjectOutput
Parameters:
o - the Object to write
Throws:
java.io.IOException - if an I/O error occurs

Oracle® Coherence Java API Reference
v3.5

E14977-01

Copyright © 2000, 2009, Oracle. All rights reserved.