Package com.tangosol.io
Class WrapperObjectOutputStream
java.lang.Object
java.io.OutputStream
com.tangosol.io.WrapperDataOutputStream
com.tangosol.io.WrapperObjectOutputStream
- All Implemented Interfaces:
com.oracle.coherence.common.io.OutputStreaming,OutputStreaming,Closeable,DataOutput,Flushable,ObjectOutput,AutoCloseable
- Direct Known Subclasses:
ExternalizableHelper.ShieldedObjectOutputStream
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
ConstructorsConstructorDescriptionConstruct a WrapperObjectOutputStream that will output to the specified object implementing the ObjectOutput interface. -
Method Summary
Modifier and TypeMethodDescriptionlongReturn the total number of bytes written to the wrapped DataOutput object.Obtain the underlying object providing the ObjectOutput interface that this object is delegating to.voidWrites the Objectoso that the correspondingObjectInput.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, writeUTFMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Constructor Details
-
WrapperObjectOutputStream
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
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:
getBytesWrittenin classWrapperDataOutputStream- Returns:
- the total number of bytes written
- Throws:
UnsupportedOperationException- always
-
writeObject
Writes the Objectoso that the correspondingObjectInput.readObject()method can reconstitute an Object from the written data.- Specified by:
writeObjectin interfaceObjectOutput- Parameters:
o- the Object to write- Throws:
IOException- if an I/O error occurs
-