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.IOException
abortIOException
private static org.glassfish.pfl.basic.reflection.Bridge
bridge
private java.util.Stack<ObjectStreamClass>
classDescStack
private ObjectStreamClass
currentClassDesc
private java.lang.Object
currentObject
private OutputStream
orbStream
private int
recursionDepth
private int
simpleWriteDepth
-
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 void
annotateClass(java.lang.Class<?> cl)
protected void
beginOptionalCustomData()
private boolean
checkSpecialClasses(java.lang.Object obj)
private boolean
checkSubstitutableSpecialClasses(java.lang.Object obj)
void
close()
(package private) int
decreaseRecursionDepth()
void
defaultWriteObjectDelegate()
Override the actions of the final method "defaultWriteObject()" in ObjectOutputStream.protected void
drain()
boolean
enableReplaceObjectDelegate(boolean enable)
Override the actions of the final method "enableReplaceObject()" in ObjectOutputStream.void
flush()
(package private) ObjectStreamField[]
getFieldsNoCopy()
(package private) OutputStream
getOrbStream()
(package private) void
increaseRecursionDepth()
protected void
internalWriteUTF(OutputStream stream, java.lang.String data)
Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars).private void
invokeObjectWriter(ObjectStreamClass osc, java.lang.Object obj)
private void
outputClassFields(java.lang.Object o, java.lang.Class cl, ObjectStreamField[] fields)
private void
outputObject(java.lang.Object obj)
private void
recursionDepthInfo(int rd)
protected java.lang.Object
replaceObject(java.lang.Object obj)
void
reset()
Reset will disregard the state of any objects already written to the stream.(package private) void
setOrbStream(OutputStream os)
void
simpleWriteObject(java.lang.Object obj, byte formatVersion)
Override the actions of the final method "writeObject()" in ObjectOutputStream.void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int data)
void
writeBoolean(boolean data)
void
writeByte(int data)
void
writeBytes(java.lang.String data)
void
writeChar(int data)
void
writeChars(java.lang.String data)
void
writeDouble(double data)
(package private) void
writeField(ObjectStreamField field, java.lang.Object value)
void
writeFloat(float data)
private void
writeFormatVersion()
void
writeInt(int data)
void
writeLong(long data)
private void
writeObjectField(ObjectStreamField field, java.lang.Object objectValue)
void
writeObjectOverride(java.lang.Object obj)
Override the actions of the final method "writeObject()" in ObjectOutputStream.void
writeShort(int data)
protected void
writeStreamHeader()
void
writeUTF(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:
beginOptionalCustomData
in classOutputStreamHook
-
setOrbStream
final void setOrbStream(OutputStream os)
-
getOrbStream
final OutputStream getOrbStream()
- Specified by:
getOrbStream
in 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.IOException
Override the actions of the final method "writeObject()" in ObjectOutputStream.- Overrides:
writeObjectOverride
in 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:
getFieldsNoCopy
in classOutputStreamHook
-
defaultWriteObjectDelegate
public final void defaultWriteObjectDelegate()
Override the actions of the final method "defaultWriteObject()" in ObjectOutputStream.- Specified by:
defaultWriteObjectDelegate
in 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:
annotateClass
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
close
public final void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfacejava.io.ObjectOutput
- Overrides:
close
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
drain
protected final void drain() throws java.io.IOException
- Overrides:
drain
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
flush
public final void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in interfacejava.io.ObjectOutput
- Overrides:
flush
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
replaceObject
protected final java.lang.Object replaceObject(java.lang.Object obj) throws java.io.IOException
- Overrides:
replaceObject
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
reset
public final void reset() throws java.io.IOException
Reset 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:
reset
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
- Since:
- JDK1.1
-
write
public final void write(byte[] b) throws java.io.IOException
- Specified by:
write
in interfacejava.io.DataOutput
- Specified by:
write
in interfacejava.io.ObjectOutput
- Overrides:
write
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
write
public final void write(byte[] b, int off, int len) throws java.io.IOException
- Specified by:
write
in interfacejava.io.DataOutput
- Specified by:
write
in interfacejava.io.ObjectOutput
- Overrides:
write
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
write
public final void write(int data) throws java.io.IOException
- Specified by:
write
in interfacejava.io.DataOutput
- Specified by:
write
in interfacejava.io.ObjectOutput
- Overrides:
write
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeBoolean
public final void writeBoolean(boolean data) throws java.io.IOException
- Specified by:
writeBoolean
in interfacejava.io.DataOutput
- Overrides:
writeBoolean
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeByte
public final void writeByte(int data) throws java.io.IOException
- Specified by:
writeByte
in interfacejava.io.DataOutput
- Overrides:
writeByte
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeBytes
public final void writeBytes(java.lang.String data) throws java.io.IOException
- Specified by:
writeBytes
in interfacejava.io.DataOutput
- Overrides:
writeBytes
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeChar
public final void writeChar(int data) throws java.io.IOException
- Specified by:
writeChar
in interfacejava.io.DataOutput
- Overrides:
writeChar
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeChars
public final void writeChars(java.lang.String data) throws java.io.IOException
- Specified by:
writeChars
in interfacejava.io.DataOutput
- Overrides:
writeChars
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeDouble
public final void writeDouble(double data) throws java.io.IOException
- Specified by:
writeDouble
in interfacejava.io.DataOutput
- Overrides:
writeDouble
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeFloat
public final void writeFloat(float data) throws java.io.IOException
- Specified by:
writeFloat
in interfacejava.io.DataOutput
- Overrides:
writeFloat
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeInt
public final void writeInt(int data) throws java.io.IOException
- Specified by:
writeInt
in interfacejava.io.DataOutput
- Overrides:
writeInt
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeLong
public final void writeLong(long data) throws java.io.IOException
- Specified by:
writeLong
in interfacejava.io.DataOutput
- Overrides:
writeLong
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeShort
public final void writeShort(int data) throws java.io.IOException
- Specified by:
writeShort
in interfacejava.io.DataOutput
- Overrides:
writeShort
in classjava.io.ObjectOutputStream
- Throws:
java.io.IOException
-
writeStreamHeader
protected final void writeStreamHeader() throws java.io.IOException
- Overrides:
writeStreamHeader
in 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:
writeUTF
in interfacejava.io.DataOutput
- Overrides:
writeUTF
in 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:
writeField
in 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.IOException
java.io.InvalidClassException
-
-