Package com.sun.corba.se.impl.io
Class IIOPInputStream
java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
com.sun.corba.se.impl.io.InputStreamHook
com.sun.corba.se.impl.io.IIOPInputStream
- All Implemented Interfaces:
Closeable,DataInput,ObjectInput,ObjectStreamConstants,AutoCloseable
IIOPInputStream is used by the ValueHandlerImpl to handle Java serialization
input semantics.
- Since:
- JDK1.1.6
- Author:
- Stephen Lewallen
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.corba.se.impl.io.InputStreamHook
InputStreamHook.DefaultState, InputStreamHook.InReadObjectDefaultsSentState, InputStreamHook.InReadObjectNoMoreOptionalDataState, InputStreamHook.InReadObjectOptionalDataState, InputStreamHook.InReadObjectPastDefaultsRemoteDidNotUseWOState, InputStreamHook.InReadObjectRemoteDidNotUseWriteObjectState, InputStreamHook.NoReadObjectDefaultsSentState, InputStreamHook.ReadObjectStateNested classes/interfaces inherited from class java.io.ObjectInputStream
ObjectInputStream.GetField -
Field Summary
FieldsFields inherited from class com.sun.corba.se.impl.io.InputStreamHook
DEFAULT_STATE, IN_READ_OBJECT_DEFAULTS_SENT, IN_READ_OBJECT_NO_MORE_OPT_DATA, IN_READ_OBJECT_OPT_DATA, IN_READ_OBJECT_PAST_DEFAULTS_REMOTE_NOT_CUSTOM, IN_READ_OBJECT_REMOTE_NOT_CUSTOM_MARSHALED, NO_READ_OBJECT_DEFAULTS_SENT, readObjectStateFields 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, SERIAL_FILTER_PERMISSION, 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 -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal voidclose()final booleanenableResolveObjectDelegate(boolean enable) Override the actions of the final method "enableResolveObject()" in ObjectInputStream.final CodeBaseprotected bytefinal ValueHandlerprotected StringinternalReadUTF(InputStream stream) Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars).final voidmark(int readAheadLimit) final booleanfinal intread()final intread(byte[] data, int offset, int length) final booleanfinal bytereadByte()final charreadChar()final doublefinal floatfinal voidreadFully(byte[] data) final voidreadFully(byte[] data, int offset, int size) final intreadInt()final StringreadLine()final longreadLong()final ObjectOverride the actions of the final method "readObject()" in ObjectInputStream.protected final ObjectThis method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.final shortprotected final voidfinal intfinal intfinal StringreadUTF()final voidregisterValidation(ObjectInputValidation obj, int prio) final voidreset()protected final Classprotected final ObjectresolveObject(Object obj) final voidstatic voidsetTestFVDFlag(boolean val) final voidfinal voidsimpleSkipObject(String repositoryID, CodeBase sender) final intskipBytes(int len) Methods inherited from class com.sun.corba.se.impl.io.InputStreamHook
defaultReadObject, readFields, setState, throwOptionalDataIncompatibleExceptionMethods inherited from class java.io.ObjectInputStream
enableResolveObject, getObjectInputFilter, readClassDescriptor, readObject, readUnshared, resolveClass, resolveProxyClass, setObjectInputFilterMethods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.ObjectInput
read, skip
-
Field Details
-
kRemoteTypeCode
-
kValueTypeCode
-
-
Constructor Details
-
IIOPInputStream
Dummy constructor; passes upper stream a dummy stream;- Throws:
IOException
-
-
Method Details
-
getStreamFormatVersion
protected byte getStreamFormatVersion()- Specified by:
getStreamFormatVersionin classInputStreamHook
-
setTestFVDFlag
public static void setTestFVDFlag(boolean val) -
setSender
-
getSender
-
setValueHandler
-
getValueHandler
-
readObjectDelegate
Override the actions of the final method "readObject()" in ObjectInputStream.- Throws:
ClassNotFoundException- Class of a serialized object cannot be found.InvalidClassException- Something is wrong with a class used by serialization.StreamCorruptedException- Control information in the stream is inconsistent.OptionalDataException- Primitive data was found in the stream instead of objects.IOException- Any of the usual Input/Output related exceptions.- Since:
- JDK1.1.6
Read an object from the ObjectInputStream.
The class of the object, the signature of the class, and the values
of the non-transient and non-static fields of the class and all
of its supertypes are read. Default deserializing for a class can be
overriden using the writeObject and readObject methods.
Objects referenced by this object are read transitively so
that a complete equivalent graph of objects is reconstructed by readObject.
The root object is completly restored when all of its fields and the objects it references are completely restored. At this point the object validation callbacks are executed in order based on their registered priorities. The callbacks are registered by objects (in the readObject special methods) as they are individually restored. Exceptions are thrown for problems with the InputStream and for classes that should not be deserialized. All exceptions are fatal to the InputStream and leave it in an indeterminate state; it is up to the caller to ignore or recover the stream state., JDK1.1
-
simpleSkipObject
-
readObjectOverride
protected final Object readObjectOverride() throws OptionalDataException, ClassNotFoundException, IOExceptionThis method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor. The subclass is expected to provide an override method with the modifier "final".- Overrides:
readObjectOverridein classObjectInputStream- Returns:
- the Object read from the stream.
- Throws:
OptionalDataExceptionClassNotFoundExceptionIOException- Since:
- JDK 1.2
- See Also:
-
#ObjectInputStream()ObjectInputStream.readObject()
-
enableResolveObjectDelegate
public final boolean enableResolveObjectDelegate(boolean enable) Override the actions of the final method "enableResolveObject()" in ObjectInputStream.- Throws:
SecurityException- The classloader of this stream object is non-null.- Since:
- JDK1.1.6
Enable the stream to allow objects read from the stream to be replaced.
If the stream is a trusted class it is allowed to enable replacment.
Trusted classes are those classes with a classLoader equals null.
When enabled the resolveObject method is called for every object being deserialized., JDK1.1
-
mark
public final void mark(int readAheadLimit) - Overrides:
markin classInputStream
-
markSupported
public final boolean markSupported()- Overrides:
markSupportedin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
available
- Specified by:
availablein interfaceObjectInput- Overrides:
availablein classObjectInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectInput- Overrides:
closein classObjectInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Overrides:
readBooleanin classObjectInputStream- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Overrides:
readBytein classObjectInputStream- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Overrides:
readCharin classObjectInputStream- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Overrides:
readDoublein classObjectInputStream- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Overrides:
readFloatin classObjectInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Overrides:
readIntin classObjectInputStream- Throws:
IOException
-
readLine
- Specified by:
readLinein interfaceDataInput- Overrides:
readLinein classObjectInputStream- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Overrides:
readLongin classObjectInputStream- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Overrides:
readShortin classObjectInputStream- Throws:
IOException
-
readStreamHeader
- Overrides:
readStreamHeaderin classObjectInputStream- Throws:
IOExceptionStreamCorruptedException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Overrides:
readUnsignedBytein classObjectInputStream- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Overrides:
readUnsignedShortin classObjectInputStream- Throws:
IOException
-
internalReadUTF
Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars). The old behavior is preserved in orbutil.IIOPInputStream_1_3 in order to interoperate with our legacy ORBs. -
readUTF
- Specified by:
readUTFin interfaceDataInput- Overrides:
readUTFin classObjectInputStream- Throws:
IOException
-
registerValidation
public final void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException - Overrides:
registerValidationin classObjectInputStream- Throws:
NotActiveExceptionInvalidObjectException
-
resolveClass
- Throws:
IOExceptionClassNotFoundException
-
resolveObject
- Overrides:
resolveObjectin classObjectInputStream- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Overrides:
skipBytesin classObjectInputStream- Throws:
IOException
-