Package com.sun.corba.ee.impl.io
Class IIOPOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ObjectOutputStream
-
- com.sun.corba.ee.impl.io.OutputStreamHook
-
- com.sun.corba.ee.impl.io.IIOPOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.DataOutput,java.io.Flushable,java.io.ObjectOutput,java.io.ObjectStreamConstants,java.lang.AutoCloseable
public class IIOPOutputStream extends OutputStreamHook
IIOPOutputStream is ...- Since:
- JDK1.1.6
- Version:
- 0.01, 4/6/98
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.corba.ee.impl.io.OutputStreamHook
OutputStreamHook.DefaultState, OutputStreamHook.InWriteObjectState, OutputStreamHook.WriteObjectState, OutputStreamHook.WroteCustomDataState, OutputStreamHook.WroteDefaultDataState
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.IOExceptionabortIOExceptionprivate static org.glassfish.pfl.basic.reflection.Bridgebridgeprivate java.util.Stack<ObjectStreamClass>classDescStackprivate ObjectStreamClasscurrentClassDescprivate java.lang.ObjectcurrentObjectprivate OutputStreamorbStreamprivate intrecursionDepthprivate intsimpleWriteDepth-
Fields inherited from class com.sun.corba.ee.impl.io.OutputStreamHook
IN_WRITE_OBJECT, NOT_IN_WRITE_OBJECT, streamFormatVersion, writeObjectState, WROTE_CUSTOM_DATA, WROTE_DEFAULT_DATA
-
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
-
-
Constructor Summary
Constructors Constructor Description IIOPOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidannotateClass(java.lang.Class<?> cl)protected voidbeginOptionalCustomData()private booleancheckSpecialClasses(java.lang.Object obj)private booleancheckSubstitutableSpecialClasses(java.lang.Object obj)voidclose()(package private) intdecreaseRecursionDepth()voiddefaultWriteObjectDelegate()Override the actions of the final method "defaultWriteObject()" in ObjectOutputStream.protected voiddrain()booleanenableReplaceObjectDelegate(boolean enable)Override the actions of the final method "enableReplaceObject()" in ObjectOutputStream.voidflush()(package private) ObjectStreamField[]getFieldsNoCopy()(package private) OutputStreamgetOrbStream()(package private) voidincreaseRecursionDepth()protected voidinternalWriteUTF(OutputStream stream, java.lang.String data)Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars).private voidinvokeObjectWriter(ObjectStreamClass osc, java.lang.Object obj)private voidoutputClassFields(java.lang.Object o, java.lang.Class cl, ObjectStreamField[] fields)private voidoutputObject(java.lang.Object obj)private voidrecursionDepthInfo(int rd)protected java.lang.ObjectreplaceObject(java.lang.Object obj)voidreset()Reset will disregard the state of any objects already written to the stream.(package private) voidsetOrbStream(OutputStream os)voidsimpleWriteObject(java.lang.Object obj, byte formatVersion)Override the actions of the final method "writeObject()" in ObjectOutputStream.voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int data)voidwriteBoolean(boolean data)voidwriteByte(int data)voidwriteBytes(java.lang.String data)voidwriteChar(int data)voidwriteChars(java.lang.String data)voidwriteDouble(double data)(package private) voidwriteField(ObjectStreamField field, java.lang.Object value)voidwriteFloat(float data)private voidwriteFormatVersion()voidwriteInt(int data)voidwriteLong(long data)private voidwriteObjectField(ObjectStreamField field, java.lang.Object objectValue)voidwriteObjectOverride(java.lang.Object obj)Override the actions of the final method "writeObject()" in ObjectOutputStream.voidwriteShort(int data)protected voidwriteStreamHeader()voidwriteUTF(java.lang.String data)-
Methods inherited from class com.sun.corba.ee.impl.io.OutputStreamHook
defaultWriteObject, getStreamFormatVersion, putFields, setState, writeFields
-
-
-
-
Field Detail
-
bridge
private static org.glassfish.pfl.basic.reflection.Bridge bridge
-
orbStream
private OutputStream orbStream
-
currentObject
private java.lang.Object currentObject
-
currentClassDesc
private ObjectStreamClass currentClassDesc
-
recursionDepth
private int recursionDepth
-
simpleWriteDepth
private int simpleWriteDepth
-
abortIOException
private java.io.IOException abortIOException
-
classDescStack
private java.util.Stack<ObjectStreamClass> classDescStack
-
-
Method Detail
-
beginOptionalCustomData
protected void beginOptionalCustomData()
- Specified by:
beginOptionalCustomDatain classOutputStreamHook
-
setOrbStream
final void setOrbStream(OutputStream os)
-
getOrbStream
final OutputStream getOrbStream()
- Specified by:
getOrbStreamin classOutputStreamHook
-
recursionDepthInfo
@InfoMethod private void recursionDepthInfo(int rd)
-
increaseRecursionDepth
final void increaseRecursionDepth()
-
decreaseRecursionDepth
final int decreaseRecursionDepth()
-
writeFormatVersion
private void writeFormatVersion()
-
writeObjectOverride
public final void writeObjectOverride(java.lang.Object obj) throws java.io.IOExceptionOverride the actions of the final method "writeObject()" in ObjectOutputStream.- Overrides:
writeObjectOverridein classjava.io.ObjectOutputStream- Throws:
java.io.IOException- Since:
- JDK1.1.6
-
simpleWriteObject
public final void simpleWriteObject(java.lang.Object obj, byte formatVersion)Override the actions of the final method "writeObject()" in ObjectOutputStream.- Parameters:
obj- Object to writeformatVersion- Format version- Since:
- JDK1.1.6
-
getFieldsNoCopy
ObjectStreamField[] getFieldsNoCopy()
- Specified by:
getFieldsNoCopyin classOutputStreamHook
-
defaultWriteObjectDelegate
public final void defaultWriteObjectDelegate()
Override the actions of the final method "defaultWriteObject()" in ObjectOutputStream.- Specified by:
defaultWriteObjectDelegatein classOutputStreamHook- Since:
- JDK1.1.6
-
enableReplaceObjectDelegate
public final boolean enableReplaceObjectDelegate(boolean enable)
Override the actions of the final method "enableReplaceObject()" in ObjectOutputStream.- Parameters:
enable- ignored- Returns:
false- Since:
- JDK1.1.6
-
annotateClass
protected final void annotateClass(java.lang.Class<?> cl) throws java.io.IOException- Overrides:
annotateClassin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
close
public final void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.io.ObjectOutput- Overrides:
closein classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
drain
protected final void drain() throws java.io.IOException- Overrides:
drainin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
flush
public final void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin interfacejava.io.ObjectOutput- Overrides:
flushin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
replaceObject
protected final java.lang.Object replaceObject(java.lang.Object obj) throws java.io.IOException- Overrides:
replaceObjectin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
reset
public final void reset() throws java.io.IOExceptionReset will disregard the state of any objects already written to the stream. The state is reset to be the same as a new ObjectOutputStream. The current point in the stream is marked as reset so the corresponding ObjectInputStream will be reset at the same point. Objects previously written to the stream will not be refered to as already being in the stream. They will be written to the stream again.- Overrides:
resetin classjava.io.ObjectOutputStream- Throws:
java.io.IOException- Since:
- JDK1.1
-
write
public final void write(byte[] b) throws java.io.IOException- Specified by:
writein interfacejava.io.DataOutput- Specified by:
writein interfacejava.io.ObjectOutput- Overrides:
writein classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
write
public final void write(byte[] b, int off, int len) throws java.io.IOException- Specified by:
writein interfacejava.io.DataOutput- Specified by:
writein interfacejava.io.ObjectOutput- Overrides:
writein classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
write
public final void write(int data) throws java.io.IOException- Specified by:
writein interfacejava.io.DataOutput- Specified by:
writein interfacejava.io.ObjectOutput- Overrides:
writein classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeBoolean
public final void writeBoolean(boolean data) throws java.io.IOException- Specified by:
writeBooleanin interfacejava.io.DataOutput- Overrides:
writeBooleanin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeByte
public final void writeByte(int data) throws java.io.IOException- Specified by:
writeBytein interfacejava.io.DataOutput- Overrides:
writeBytein classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeBytes
public final void writeBytes(java.lang.String data) throws java.io.IOException- Specified by:
writeBytesin interfacejava.io.DataOutput- Overrides:
writeBytesin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeChar
public final void writeChar(int data) throws java.io.IOException- Specified by:
writeCharin interfacejava.io.DataOutput- Overrides:
writeCharin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeChars
public final void writeChars(java.lang.String data) throws java.io.IOException- Specified by:
writeCharsin interfacejava.io.DataOutput- Overrides:
writeCharsin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeDouble
public final void writeDouble(double data) throws java.io.IOException- Specified by:
writeDoublein interfacejava.io.DataOutput- Overrides:
writeDoublein classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeFloat
public final void writeFloat(float data) throws java.io.IOException- Specified by:
writeFloatin interfacejava.io.DataOutput- Overrides:
writeFloatin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeInt
public final void writeInt(int data) throws java.io.IOException- Specified by:
writeIntin interfacejava.io.DataOutput- Overrides:
writeIntin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeLong
public final void writeLong(long data) throws java.io.IOException- Specified by:
writeLongin interfacejava.io.DataOutput- Overrides:
writeLongin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeShort
public final void writeShort(int data) throws java.io.IOException- Specified by:
writeShortin interfacejava.io.DataOutput- Overrides:
writeShortin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
writeStreamHeader
protected final void writeStreamHeader() throws java.io.IOException- Overrides:
writeStreamHeaderin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
internalWriteUTF
protected void internalWriteUTF(OutputStream stream, java.lang.String data)
Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars). The old behavior was preserved in orbutil.IIOPInputStream_1_3 in order to interoperate with our legacy ORBs.- Parameters:
stream- Stream to write todata- Data to write
-
writeUTF
public final void writeUTF(java.lang.String data) throws java.io.IOException- Specified by:
writeUTFin interfacejava.io.DataOutput- Overrides:
writeUTFin classjava.io.ObjectOutputStream- Throws:
java.io.IOException
-
checkSpecialClasses
private boolean checkSpecialClasses(java.lang.Object obj) throws java.io.IOException- Throws:
java.io.IOException
-
checkSubstitutableSpecialClasses
private boolean checkSubstitutableSpecialClasses(java.lang.Object obj) throws java.io.IOException- Throws:
java.io.IOException
-
outputObject
private void outputObject(java.lang.Object obj) throws java.io.IOException- Throws:
java.io.IOException
-
invokeObjectWriter
private void invokeObjectWriter(ObjectStreamClass osc, java.lang.Object obj) throws java.io.IOException
- Throws:
java.io.IOException
-
writeField
void writeField(ObjectStreamField field, java.lang.Object value) throws java.io.IOException
- Specified by:
writeFieldin classOutputStreamHook- Throws:
java.io.IOException
-
writeObjectField
private void writeObjectField(ObjectStreamField field, java.lang.Object objectValue) throws java.io.IOException
- Throws:
java.io.IOException
-
outputClassFields
private void outputClassFields(java.lang.Object o, java.lang.Class cl, ObjectStreamField[] fields) throws java.io.IOException, java.io.InvalidClassException- Throws:
java.io.IOExceptionjava.io.InvalidClassException
-
-