Package com.sun.corba.ee.impl.io
Class IIOPInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ObjectInputStream
-
- com.sun.corba.ee.impl.io.InputStreamHook
-
- com.sun.corba.ee.impl.io.IIOPInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.io.ObjectInput
,java.io.ObjectStreamConstants
,java.lang.AutoCloseable
public class IIOPInputStream extends InputStreamHook
IIOPInputStream is used by the ValueHandlerImpl to handle Java serialization input semantics.- Since:
- JDK1.1.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
IIOPInputStream.ActiveRecursionManager
This class maintains a map of stream position to an Object currently being deserialized.-
Nested classes/interfaces inherited from class com.sun.corba.ee.impl.io.InputStreamHook
InputStreamHook.DefaultState, InputStreamHook.InReadObjectDefaultsSentState, InputStreamHook.InReadObjectNoMoreOptionalDataState, InputStreamHook.InReadObjectOptionalDataState, InputStreamHook.InReadObjectPastDefaultsRemoteDidNotUseWOState, InputStreamHook.InReadObjectRemoteDidNotUseWriteObjectState, InputStreamHook.NoReadObjectDefaultsSentState, InputStreamHook.ReadObjectState
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ClassNotFoundException
abortClassNotFoundException
private java.io.IOException
abortIOException
(package private) IIOPInputStream.ActiveRecursionManager
activeRecursionMgr
private static org.glassfish.pfl.basic.reflection.Bridge
bridge
private java.util.List<java.lang.Object>
callbacks
private CodeBase
cbSender
(package private) ObjectStreamClass[]
classdesc
(package private) java.lang.Class[]
classes
private java.lang.Class<?>
currentClass
private ObjectStreamClass
currentClassDesc
private java.lang.Object
currentObject
private ValueMember[]
defaultReadObjectFVDMembers
private static java.lang.String
kEmptyStr
static TypeCode
kRemoteTypeCode
static TypeCode
kValueTypeCode
private InputStream
orbStream
private int
recursionDepth
private int
simpleReadDepth
(package private) int
spClass
private byte
streamFormatVersion
private static boolean
useFVDOnly
private ValueHandlerImpl
vhandler
-
Fields inherited from class com.sun.corba.ee.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, omgWrapper, readObjectState, utilWrapper
-
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 IIOPInputStream()
Dummy constructor; passes upper stream a dummy stream;
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
private void
callReadExternal(java.io.Externalizable ext)
private void
callTypeInfo(int ct)
private void
classHasWriteObject(boolean flag)
void
close()
private void
currentClassInfo(ObjectStreamClass ocs, java.lang.Class<?> cls)
(package private) int
decreaseRecursionDepth()
void
defaultReadObjectDelegate()
Override the actions of the final method "defaultReadObject()" in ObjectInputStream.private java.lang.String
displayFVD(FullValueDescription fvd)
private void
displayValueMember(ValueMember member)
private void
displayValueMembers(ValueMember[] members)
boolean
enableResolveObjectDelegate(boolean enable)
Override the actions of the final method "enableResolveObject()" in ObjectInputStream.private int
findNextClass(java.lang.String classname, java.lang.Class[] classes, int _spClass, int _spBase)
private void
fullValueDescriptorsInfo(java.util.List<FullValueDescription> fvds)
(package private) InputStream
getOrbStream()
private java.util.List<FullValueDescription>
getOrderedDescriptions(java.lang.String repositoryID, CodeBase sender)
CodeBase
getSender()
private boolean
getSimulatedDefaultWriteObjectCalledFlag()
protected byte
getStreamFormatVersion()
ValueHandler
getValueHandler()
private java.lang.Object
handleEnum(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo)
private void
handleOptionalDataMarshalException(MARSHAL marshalException, boolean objectRead)
(package private) void
increaseRecursionDepth()
private void
inputClassFields(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamClass osc, ValueMember[] fields, CodeBase sender)
private void
inputClassFields(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamField[] fields, CodeBase sender)
private void
inputCurrentClassFieldsForReadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap)
Called from InputStreamHook.private java.lang.Object
inputObject(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset)
private java.lang.Object
inputObjectField(ObjectStreamField field)
Factored out of inputClassFields and reused in inputCurrentClassFieldsForReadFields.private java.lang.Object
inputObjectField(ValueMember field, CodeBase sender)
private java.lang.Object
inputObjectUsingFVD(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset)
This input method uses FullValueDescriptions retrieved from the sender's runtime to read in the data.private void
inputPrimitiveField(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamField field)
Factored out of inputClassFields This reads a primitive value and sets it in the field of o described by the ObjectStreamField field.private void
inputRemoteMembersForReadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap)
protected java.lang.String
internalReadUTF(InputStream stream)
Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars).private boolean
invokeObjectReader(ObjectStreamClass osc, java.lang.Object obj, java.lang.Class aclass, ValueMember[] valueMembers)
private boolean
isDateClassWorkaroundRequired()
private boolean
isJdk9_orLater()
void
mark(int readAheadLimit)
boolean
markSupported()
private void
matchingClassInfo(java.lang.Class<?> cls)
private void
newInstanceInfo(java.lang.Class<?> cls)
int
read()
int
read(byte[] data, int offset, int length)
boolean
readBoolean()
byte
readByte()
char
readChar()
private boolean
readDefaultWriteObjectCalledFlag()
double
readDouble()
(package private) void
readFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap)
float
readFloat()
private void
readFormatVersion()
void
readFully(byte[] data)
void
readFully(byte[] data, int offset, int size)
private void
readingDataForClass(java.lang.Class<?> cls)
private void
readingDataUsingFVD(FullValueDescription fvd)
private void
readingExternalizable()
private void
readingField(int index, ObjectStreamField fld)
private void
readingPrimitiveFields(int count)
private void
readingSerializable()
int
readInt()
java.lang.String
readLine()
long
readLong()
java.lang.Object
readObjectDelegate()
Override the actions of the final method "readObject()" in ObjectInputStream.protected java.lang.Object
readObjectOverride()
This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.short
readShort()
protected void
readStreamHeader()
int
readUnsignedByte()
int
readUnsignedShort()
java.lang.String
readUTF()
private void
recursionDepthInfo(int rd)
void
registerValidation(java.io.ObjectInputValidation obj, int prio)
void
reset()
private void
resetStream()
protected java.lang.Class<?>
resolveClass(java.io.ObjectStreamClass v)
protected java.lang.Object
resolveObject(java.lang.Object obj)
private static void
setBooleanField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, boolean v)
private static void
setByteField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, byte v)
private static void
setCharField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, char v)
private static void
setDoubleField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, double v)
private static void
setFloatField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, float v)
private static void
setIntField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, int v)
private static void
setLongField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, long v)
private static void
setObjectField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, java.lang.Object v)
(package private) void
setOrbStream(InputStream os)
void
setSender(CodeBase cb)
private static void
setShortField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, short v)
static void
setTestFVDFlag(boolean val)
void
setValueHandler(ValueHandler vh)
(package private) java.lang.Object
simpleReadObject(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset)
void
simpleSkipObject(java.lang.String repositoryID, CodeBase sender)
int
skipBytes(int len)
private void
skipCustomUsingFVD(ValueMember[] fields, CodeBase sender)
private java.lang.Object
skipObjectUsingFVD(java.lang.String repositoryID, CodeBase sender)
This input method uses FullValueDescriptions retrieved from the sender's runtime to read in the data.private void
streamFormatVersionInfo(byte sfv)
private void
throwAwayData(ValueMember[] fields, CodeBase sender)
private void
typeInfo(java.lang.Class<?> type)
private void
usingLocalFieldsToRead()
private void
valueMemberInfo(java.lang.String name, java.lang.String id, java.lang.String definedIn, java.lang.String version, short access)
-
Methods inherited from class com.sun.corba.ee.impl.io.InputStreamHook
defaultReadObject, readFields, setState, throwOptionalDataIncompatibleException
-
Methods inherited from class java.io.ObjectInputStream
enableResolveObject, readClassDescriptor, readObject, readUnshared, resolveProxyClass
-
-
-
-
Field Detail
-
bridge
private static org.glassfish.pfl.basic.reflection.Bridge bridge
-
defaultReadObjectFVDMembers
private ValueMember[] defaultReadObjectFVDMembers
-
orbStream
private InputStream orbStream
-
cbSender
private CodeBase cbSender
-
vhandler
private ValueHandlerImpl vhandler
-
currentObject
private java.lang.Object currentObject
-
currentClassDesc
private ObjectStreamClass currentClassDesc
-
currentClass
private java.lang.Class<?> currentClass
-
recursionDepth
private int recursionDepth
-
simpleReadDepth
private int simpleReadDepth
-
activeRecursionMgr
IIOPInputStream.ActiveRecursionManager activeRecursionMgr
-
abortIOException
private java.io.IOException abortIOException
-
abortClassNotFoundException
private java.lang.ClassNotFoundException abortClassNotFoundException
-
callbacks
private java.util.List<java.lang.Object> callbacks
-
classdesc
ObjectStreamClass[] classdesc
-
classes
java.lang.Class[] classes
-
spClass
int spClass
-
kEmptyStr
private static final java.lang.String kEmptyStr
- See Also:
- Constant Field Values
-
kRemoteTypeCode
public static final TypeCode kRemoteTypeCode
-
kValueTypeCode
public static final TypeCode kValueTypeCode
-
useFVDOnly
private static final boolean useFVDOnly
- See Also:
- Constant Field Values
-
streamFormatVersion
private byte streamFormatVersion
-
-
Method Detail
-
getStreamFormatVersion
protected byte getStreamFormatVersion()
- Specified by:
getStreamFormatVersion
in classInputStreamHook
-
streamFormatVersionInfo
@InfoMethod private void streamFormatVersionInfo(byte sfv)
-
readFormatVersion
private void readFormatVersion() throws java.io.IOException
- Throws:
java.io.IOException
-
setTestFVDFlag
public static void setTestFVDFlag(boolean val)
-
setOrbStream
final void setOrbStream(InputStream os)
-
getOrbStream
final InputStream getOrbStream()
- Specified by:
getOrbStream
in classInputStreamHook
-
setSender
public final void setSender(CodeBase cb)
-
getSender
public final CodeBase getSender()
-
setValueHandler
public final void setValueHandler(ValueHandler vh)
-
getValueHandler
public final ValueHandler getValueHandler()
-
recursionDepthInfo
@InfoMethod private void recursionDepthInfo(int rd)
-
increaseRecursionDepth
final void increaseRecursionDepth()
-
decreaseRecursionDepth
final int decreaseRecursionDepth()
-
readObjectDelegate
public final java.lang.Object readObjectDelegate() throws java.lang.ClassNotFoundException, java.io.OptionalDataException, java.io.StreamCorruptedException, java.io.IOException
Override the actions of the final method "readObject()" in ObjectInputStream. 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.
- Returns:
- the object read from stream
- Throws:
java.io.InvalidClassException
- Something is wrong with a class used by serialization.java.io.StreamCorruptedException
- Control information in the stream is inconsistent.java.io.OptionalDataException
- Primitive data was found in the stream instead of objects.java.io.IOException
- Any of the usual Input/Output related exceptions.java.lang.ClassNotFoundException
- Deserialised class could not be found- Since:
- JDK1.1
-
simpleReadObject
final java.lang.Object simpleReadObject(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset)
-
simpleSkipObject
public final void simpleSkipObject(java.lang.String repositoryID, CodeBase sender)
-
readObjectOverride
protected final java.lang.Object readObjectOverride() throws java.io.OptionalDataException, java.lang.ClassNotFoundException, java.io.IOException
This 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:
readObjectOverride
in classjava.io.ObjectInputStream
- Returns:
- the Object read from the stream.
- Throws:
java.io.OptionalDataException
java.lang.ClassNotFoundException
java.io.IOException
- Since:
- JDK 1.2
- See Also:
ObjectInputStream.readObject()
-
usingLocalFieldsToRead
@InfoMethod private void usingLocalFieldsToRead()
-
defaultReadObjectDelegate
public final void defaultReadObjectDelegate()
Override the actions of the final method "defaultReadObject()" in ObjectInputStream.- Specified by:
defaultReadObjectDelegate
in classInputStreamHook
- Since:
- JDK1.1.6 Read the non-static and non-transient fields of the current class from this stream. This may only be called from the readObject method of the class being deserialized. It will throw the NotActiveException if it is called otherwise., JDK1.1
-
enableResolveObjectDelegate
public final boolean enableResolveObjectDelegate(boolean enable)
Override the actions of the final method "enableResolveObject()" in ObjectInputStream. 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.
- Parameters:
enable
- ignored- Returns:
- false
- Throws:
java.lang.SecurityException
- The classloader of this stream object is non-null.- Since:
- JDK1.1.6
-
mark
public final void mark(int readAheadLimit)
- Overrides:
mark
in classjava.io.InputStream
-
markSupported
public final boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
reset
public final void reset() throws java.io.IOException
- Overrides:
reset
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public final int available() throws java.io.IOException
- Specified by:
available
in interfacejava.io.ObjectInput
- Overrides:
available
in classjava.io.ObjectInputStream
- 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.ObjectInput
- Overrides:
close
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
read
public final int read() throws java.io.IOException
- Specified by:
read
in interfacejava.io.ObjectInput
- Overrides:
read
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
read
public final int read(byte[] data, int offset, int length) throws java.io.IOException
- Specified by:
read
in interfacejava.io.ObjectInput
- Overrides:
read
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readBoolean
public final boolean readBoolean() throws java.io.IOException
- Specified by:
readBoolean
in interfacejava.io.DataInput
- Overrides:
readBoolean
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readByte
public final byte readByte() throws java.io.IOException
- Specified by:
readByte
in interfacejava.io.DataInput
- Overrides:
readByte
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readChar
public final char readChar() throws java.io.IOException
- Specified by:
readChar
in interfacejava.io.DataInput
- Overrides:
readChar
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readDouble
public final double readDouble() throws java.io.IOException
- Specified by:
readDouble
in interfacejava.io.DataInput
- Overrides:
readDouble
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readFloat
public final float readFloat() throws java.io.IOException
- Specified by:
readFloat
in interfacejava.io.DataInput
- Overrides:
readFloat
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readFully
public final void readFully(byte[] data) throws java.io.IOException
- Specified by:
readFully
in interfacejava.io.DataInput
- Overrides:
readFully
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readFully
public final void readFully(byte[] data, int offset, int size) throws java.io.IOException
- Specified by:
readFully
in interfacejava.io.DataInput
- Overrides:
readFully
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readInt
public final int readInt() throws java.io.IOException
- Specified by:
readInt
in interfacejava.io.DataInput
- Overrides:
readInt
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readLine
public final java.lang.String readLine() throws java.io.IOException
- Specified by:
readLine
in interfacejava.io.DataInput
- Overrides:
readLine
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readLong
public final long readLong() throws java.io.IOException
- Specified by:
readLong
in interfacejava.io.DataInput
- Overrides:
readLong
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readShort
public final short readShort() throws java.io.IOException
- Specified by:
readShort
in interfacejava.io.DataInput
- Overrides:
readShort
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readStreamHeader
protected final void readStreamHeader() throws java.io.IOException, java.io.StreamCorruptedException
- Overrides:
readStreamHeader
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
java.io.StreamCorruptedException
-
readUnsignedByte
public final int readUnsignedByte() throws java.io.IOException
- Specified by:
readUnsignedByte
in interfacejava.io.DataInput
- Overrides:
readUnsignedByte
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
readUnsignedShort
public final int readUnsignedShort() throws java.io.IOException
- Specified by:
readUnsignedShort
in interfacejava.io.DataInput
- Overrides:
readUnsignedShort
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
internalReadUTF
protected java.lang.String internalReadUTF(InputStream stream)
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 read from- Returns:
- String value read from the stream
-
readUTF
public final java.lang.String readUTF() throws java.io.IOException
- Specified by:
readUTF
in interfacejava.io.DataInput
- Overrides:
readUTF
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
handleOptionalDataMarshalException
private void handleOptionalDataMarshalException(MARSHAL marshalException, boolean objectRead) throws java.io.IOException
- Throws:
java.io.IOException
-
registerValidation
public final void registerValidation(java.io.ObjectInputValidation obj, int prio)
- Overrides:
registerValidation
in classjava.io.ObjectInputStream
-
resolveClass
protected final java.lang.Class<?> resolveClass(java.io.ObjectStreamClass v) throws java.io.IOException
- Overrides:
resolveClass
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
resolveObject
protected final java.lang.Object resolveObject(java.lang.Object obj) throws java.io.IOException
- Overrides:
resolveObject
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
skipBytes
public final int skipBytes(int len) throws java.io.IOException
- Specified by:
skipBytes
in interfacejava.io.DataInput
- Overrides:
skipBytes
in classjava.io.ObjectInputStream
- Throws:
java.io.IOException
-
handleEnum
private java.lang.Object handleEnum(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo) throws java.io.IOException
- Throws:
java.io.IOException
-
readingExternalizable
@InfoMethod private void readingExternalizable()
-
readingSerializable
@InfoMethod private void readingSerializable()
-
newInstanceInfo
@InfoMethod private void newInstanceInfo(java.lang.Class<?> cls)
-
readingDataForClass
@InfoMethod private void readingDataForClass(java.lang.Class<?> cls)
-
classHasWriteObject
@InfoMethod private void classHasWriteObject(boolean flag)
-
currentClassInfo
@InfoMethod private void currentClassInfo(ObjectStreamClass ocs, java.lang.Class<?> cls)
-
matchingClassInfo
@InfoMethod private void matchingClassInfo(java.lang.Class<?> cls)
-
callReadExternal
private void callReadExternal(java.io.Externalizable ext) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
inputObject
private java.lang.Object inputObject(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
readDefaultWriteObjectCalledFlag
private boolean readDefaultWriteObjectCalledFlag() throws java.io.IOException
- Throws:
java.io.IOException
-
isDateClassWorkaroundRequired
private boolean isDateClassWorkaroundRequired()
-
getSimulatedDefaultWriteObjectCalledFlag
private boolean getSimulatedDefaultWriteObjectCalledFlag()
-
isJdk9_orLater
private boolean isJdk9_orLater()
-
fullValueDescriptorsInfo
@InfoMethod private void fullValueDescriptorsInfo(java.util.List<FullValueDescription> fvds)
-
getOrderedDescriptions
private java.util.List<FullValueDescription> getOrderedDescriptions(java.lang.String repositoryID, CodeBase sender)
-
displayFVD
private java.lang.String displayFVD(FullValueDescription fvd)
-
readingDataUsingFVD
@InfoMethod private void readingDataUsingFVD(FullValueDescription fvd)
-
inputObjectUsingFVD
private java.lang.Object inputObjectUsingFVD(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset) throws java.io.IOException, java.lang.ClassNotFoundException
This input method uses FullValueDescriptions retrieved from the sender's runtime to read in the data. This method is capable of throwing out data not applicable to client's fields. This method handles instances where the reader has a class not sent by the sender, the sender sent a class not present on the reader, and/or the reader's class does not match the sender's class. NOTE : If the local description indicates custom marshaling and the remote type's FVD also indicates custom marsahling than the local type is used to read the data off the wire. However, if either says custom while the other does not, a MARSHAL error is thrown. Externalizable is a form of custom marshaling.- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
skipObjectUsingFVD
private java.lang.Object skipObjectUsingFVD(java.lang.String repositoryID, CodeBase sender) throws java.io.IOException, java.lang.ClassNotFoundException
This input method uses FullValueDescriptions retrieved from the sender's runtime to read in the data. This method is capable of throwing out data not applicable to client's fields. NOTE : If the local description indicates custom marshaling and the remote type's FVD also indicates custom marsahling than the local type is used to read the data off the wire. However, if either says custom while the other does not, a MARSHAL error is thrown. Externalizable is a form of custom marshaling.- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
findNextClass
private int findNextClass(java.lang.String classname, java.lang.Class[] classes, int _spClass, int _spBase)
-
invokeObjectReader
private boolean invokeObjectReader(ObjectStreamClass osc, java.lang.Object obj, java.lang.Class aclass, ValueMember[] valueMembers) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
resetStream
private void resetStream() throws java.io.IOException
- Throws:
java.io.IOException
-
inputPrimitiveField
private void inputPrimitiveField(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamField field) throws java.io.InvalidClassException, java.io.IOException
Factored out of inputClassFields This reads a primitive value and sets it in the field of o described by the ObjectStreamField field. Note that reflection cannot be used here, because reflection cannot be used to set final fields.- Throws:
java.io.InvalidClassException
java.io.IOException
-
callTypeInfo
@InfoMethod private void callTypeInfo(int ct)
-
typeInfo
@InfoMethod private void typeInfo(java.lang.Class<?> type)
-
inputObjectField
private java.lang.Object inputObjectField(ValueMember field, CodeBase sender) throws IndirectionException, java.lang.ClassNotFoundException, java.io.IOException, java.io.StreamCorruptedException
- Throws:
IndirectionException
java.lang.ClassNotFoundException
java.io.IOException
java.io.StreamCorruptedException
-
inputObjectField
private java.lang.Object inputObjectField(ObjectStreamField field) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, IndirectionException, java.io.IOException
Factored out of inputClassFields and reused in inputCurrentClassFieldsForReadFields. Reads the field (which is of an Object type as opposed to a primitive) described by ObjectStreamField field and returns it.- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
IndirectionException
java.io.IOException
-
readFields
void readFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Specified by:
readFields
in classInputStreamHook
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
inputRemoteMembersForReadFields
private void inputRemoteMembersForReadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
inputCurrentClassFieldsForReadFields
private void inputCurrentClassFieldsForReadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
Called from InputStreamHook. Reads the fields of the current class (could be the ones queried from the remote FVD) and puts them in the given Map, name to value. Wraps primitives in the corresponding java.lang Objects.- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
readingPrimitiveFields
@InfoMethod private void readingPrimitiveFields(int count)
-
readingField
@InfoMethod private void readingField(int index, ObjectStreamField fld)
-
inputClassFields
private void inputClassFields(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamField[] fields, CodeBase sender) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
valueMemberInfo
@InfoMethod private void valueMemberInfo(java.lang.String name, java.lang.String id, java.lang.String definedIn, java.lang.String version, short access)
-
displayValueMember
private void displayValueMember(ValueMember member)
-
displayValueMembers
private void displayValueMembers(ValueMember[] members)
-
inputClassFields
private void inputClassFields(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamClass osc, ValueMember[] fields, CodeBase sender) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
skipCustomUsingFVD
private void skipCustomUsingFVD(ValueMember[] fields, CodeBase sender) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
throwAwayData
private void throwAwayData(ValueMember[] fields, CodeBase sender) throws java.io.InvalidClassException, java.io.StreamCorruptedException, java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.io.InvalidClassException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.IOException
-
setObjectField
private static void setObjectField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, java.lang.Object v)
-
setBooleanField
private static void setBooleanField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, boolean v)
-
setByteField
private static void setByteField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, byte v)
-
setCharField
private static void setCharField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, char v)
-
setShortField
private static void setShortField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, short v)
-
setIntField
private static void setIntField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, int v)
-
setLongField
private static void setLongField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, long v)
-
setFloatField
private static void setFloatField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, float v)
-
setDoubleField
private static void setDoubleField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, double v)
-
-