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 classIIOPInputStream.ActiveRecursionManagerThis 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.ClassNotFoundExceptionabortClassNotFoundExceptionprivate java.io.IOExceptionabortIOException(package private) IIOPInputStream.ActiveRecursionManageractiveRecursionMgrprivate static org.glassfish.pfl.basic.reflection.Bridgebridgeprivate java.util.List<java.lang.Object>callbacksprivate CodeBasecbSender(package private) ObjectStreamClass[]classdesc(package private) java.lang.Class[]classesprivate java.lang.Class<?>currentClassprivate ObjectStreamClasscurrentClassDescprivate java.lang.ObjectcurrentObjectprivate ValueMember[]defaultReadObjectFVDMembersprivate static java.lang.StringkEmptyStrstatic TypeCodekRemoteTypeCodestatic TypeCodekValueTypeCodeprivate InputStreamorbStreamprivate intrecursionDepthprivate intsimpleReadDepth(package private) intspClassprivate bytestreamFormatVersionprivate static booleanuseFVDOnlyprivate ValueHandlerImplvhandler-
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 intavailable()private voidcallReadExternal(java.io.Externalizable ext)private voidcallTypeInfo(int ct)private voidclassHasWriteObject(boolean flag)voidclose()private voidcurrentClassInfo(ObjectStreamClass ocs, java.lang.Class<?> cls)(package private) intdecreaseRecursionDepth()voiddefaultReadObjectDelegate()Override the actions of the final method "defaultReadObject()" in ObjectInputStream.private java.lang.StringdisplayFVD(FullValueDescription fvd)private voiddisplayValueMember(ValueMember member)private voiddisplayValueMembers(ValueMember[] members)booleanenableResolveObjectDelegate(boolean enable)Override the actions of the final method "enableResolveObject()" in ObjectInputStream.private intfindNextClass(java.lang.String classname, java.lang.Class[] classes, int _spClass, int _spBase)private voidfullValueDescriptorsInfo(java.util.List<FullValueDescription> fvds)(package private) InputStreamgetOrbStream()private java.util.List<FullValueDescription>getOrderedDescriptions(java.lang.String repositoryID, CodeBase sender)CodeBasegetSender()private booleangetSimulatedDefaultWriteObjectCalledFlag()protected bytegetStreamFormatVersion()ValueHandlergetValueHandler()private java.lang.ObjecthandleEnum(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo)private voidhandleOptionalDataMarshalException(MARSHAL marshalException, boolean objectRead)(package private) voidincreaseRecursionDepth()private voidinputClassFields(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamClass osc, ValueMember[] fields, CodeBase sender)private voidinputClassFields(java.lang.Object o, java.lang.Class<?> cl, ObjectStreamField[] fields, CodeBase sender)private voidinputCurrentClassFieldsForReadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap)Called from InputStreamHook.private java.lang.ObjectinputObject(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset)private java.lang.ObjectinputObjectField(ObjectStreamField field)Factored out of inputClassFields and reused in inputCurrentClassFieldsForReadFields.private java.lang.ObjectinputObjectField(ValueMember field, CodeBase sender)private java.lang.ObjectinputObjectUsingFVD(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 voidinputPrimitiveField(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 voidinputRemoteMembersForReadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap)protected java.lang.StringinternalReadUTF(InputStream stream)Helper method for correcting the Kestrel bug 4367783 (dealing with larger than 8-bit chars).private booleaninvokeObjectReader(ObjectStreamClass osc, java.lang.Object obj, java.lang.Class aclass, ValueMember[] valueMembers)private booleanisDateClassWorkaroundRequired()private booleanisJdk9_orLater()voidmark(int readAheadLimit)booleanmarkSupported()private voidmatchingClassInfo(java.lang.Class<?> cls)private voidnewInstanceInfo(java.lang.Class<?> cls)intread()intread(byte[] data, int offset, int length)booleanreadBoolean()bytereadByte()charreadChar()private booleanreadDefaultWriteObjectCalledFlag()doublereadDouble()(package private) voidreadFields(java.util.Map<java.lang.String,java.lang.Object> fieldToValueMap)floatreadFloat()private voidreadFormatVersion()voidreadFully(byte[] data)voidreadFully(byte[] data, int offset, int size)private voidreadingDataForClass(java.lang.Class<?> cls)private voidreadingDataUsingFVD(FullValueDescription fvd)private voidreadingExternalizable()private voidreadingField(int index, ObjectStreamField fld)private voidreadingPrimitiveFields(int count)private voidreadingSerializable()intreadInt()java.lang.StringreadLine()longreadLong()java.lang.ObjectreadObjectDelegate()Override the actions of the final method "readObject()" in ObjectInputStream.protected java.lang.ObjectreadObjectOverride()This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor.shortreadShort()protected voidreadStreamHeader()intreadUnsignedByte()intreadUnsignedShort()java.lang.StringreadUTF()private voidrecursionDepthInfo(int rd)voidregisterValidation(java.io.ObjectInputValidation obj, int prio)voidreset()private voidresetStream()protected java.lang.Class<?>resolveClass(java.io.ObjectStreamClass v)protected java.lang.ObjectresolveObject(java.lang.Object obj)private static voidsetBooleanField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, boolean v)private static voidsetByteField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, byte v)private static voidsetCharField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, char v)private static voidsetDoubleField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, double v)private static voidsetFloatField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, float v)private static voidsetIntField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, int v)private static voidsetLongField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, long v)private static voidsetObjectField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, java.lang.Object v)(package private) voidsetOrbStream(InputStream os)voidsetSender(CodeBase cb)private static voidsetShortField(java.lang.Object o, java.lang.Class<?> c, java.lang.String fieldName, short v)static voidsetTestFVDFlag(boolean val)voidsetValueHandler(ValueHandler vh)(package private) java.lang.ObjectsimpleReadObject(java.lang.Class clz, ClassInfoCache.ClassInfo cinfo, java.lang.String repositoryID, CodeBase sender, int offset)voidsimpleSkipObject(java.lang.String repositoryID, CodeBase sender)intskipBytes(int len)private voidskipCustomUsingFVD(ValueMember[] fields, CodeBase sender)private java.lang.ObjectskipObjectUsingFVD(java.lang.String repositoryID, CodeBase sender)This input method uses FullValueDescriptions retrieved from the sender's runtime to read in the data.private voidstreamFormatVersionInfo(byte sfv)private voidthrowAwayData(ValueMember[] fields, CodeBase sender)private voidtypeInfo(java.lang.Class<?> type)private voidusingLocalFieldsToRead()private voidvalueMemberInfo(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:
getStreamFormatVersionin 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:
getOrbStreamin 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.IOExceptionOverride 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.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 classjava.io.ObjectInputStream- Returns:
- the Object read from the stream.
- Throws:
java.io.OptionalDataExceptionjava.lang.ClassNotFoundExceptionjava.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:
defaultReadObjectDelegatein 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:
markin classjava.io.InputStream
-
markSupported
public final boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
reset
public final void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException
-
available
public final int available() throws java.io.IOException- Specified by:
availablein interfacejava.io.ObjectInput- Overrides:
availablein classjava.io.ObjectInputStream- 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.ObjectInput- Overrides:
closein classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
read
public final int read() throws java.io.IOException- Specified by:
readin interfacejava.io.ObjectInput- Overrides:
readin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
read
public final int read(byte[] data, int offset, int length) throws java.io.IOException- Specified by:
readin interfacejava.io.ObjectInput- Overrides:
readin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readBoolean
public final boolean readBoolean() throws java.io.IOException- Specified by:
readBooleanin interfacejava.io.DataInput- Overrides:
readBooleanin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readByte
public final byte readByte() throws java.io.IOException- Specified by:
readBytein interfacejava.io.DataInput- Overrides:
readBytein classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readChar
public final char readChar() throws java.io.IOException- Specified by:
readCharin interfacejava.io.DataInput- Overrides:
readCharin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readDouble
public final double readDouble() throws java.io.IOException- Specified by:
readDoublein interfacejava.io.DataInput- Overrides:
readDoublein classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readFloat
public final float readFloat() throws java.io.IOException- Specified by:
readFloatin interfacejava.io.DataInput- Overrides:
readFloatin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readFully
public final void readFully(byte[] data) throws java.io.IOException- Specified by:
readFullyin interfacejava.io.DataInput- Overrides:
readFullyin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readFully
public final void readFully(byte[] data, int offset, int size) throws java.io.IOException- Specified by:
readFullyin interfacejava.io.DataInput- Overrides:
readFullyin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readInt
public final int readInt() throws java.io.IOException- Specified by:
readIntin interfacejava.io.DataInput- Overrides:
readIntin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readLine
public final java.lang.String readLine() throws java.io.IOException- Specified by:
readLinein interfacejava.io.DataInput- Overrides:
readLinein classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readLong
public final long readLong() throws java.io.IOException- Specified by:
readLongin interfacejava.io.DataInput- Overrides:
readLongin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readShort
public final short readShort() throws java.io.IOException- Specified by:
readShortin interfacejava.io.DataInput- Overrides:
readShortin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readStreamHeader
protected final void readStreamHeader() throws java.io.IOException, java.io.StreamCorruptedException- Overrides:
readStreamHeaderin classjava.io.ObjectInputStream- Throws:
java.io.IOExceptionjava.io.StreamCorruptedException
-
readUnsignedByte
public final int readUnsignedByte() throws java.io.IOException- Specified by:
readUnsignedBytein interfacejava.io.DataInput- Overrides:
readUnsignedBytein classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
readUnsignedShort
public final int readUnsignedShort() throws java.io.IOException- Specified by:
readUnsignedShortin interfacejava.io.DataInput- Overrides:
readUnsignedShortin 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:
readUTFin interfacejava.io.DataInput- Overrides:
readUTFin 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:
registerValidationin classjava.io.ObjectInputStream
-
resolveClass
protected final java.lang.Class<?> resolveClass(java.io.ObjectStreamClass v) throws java.io.IOException- Overrides:
resolveClassin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
resolveObject
protected final java.lang.Object resolveObject(java.lang.Object obj) throws java.io.IOException- Overrides:
resolveObjectin classjava.io.ObjectInputStream- Throws:
java.io.IOException
-
skipBytes
public final int skipBytes(int len) throws java.io.IOException- Specified by:
skipBytesin interfacejava.io.DataInput- Overrides:
skipBytesin 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.IOExceptionjava.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.IOExceptionjava.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.ClassNotFoundExceptionThis 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.IOExceptionjava.lang.ClassNotFoundException
-
skipObjectUsingFVD
private java.lang.Object skipObjectUsingFVD(java.lang.String repositoryID, CodeBase sender) throws java.io.IOException, java.lang.ClassNotFoundExceptionThis 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.IOExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.IOExceptionFactored 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.InvalidClassExceptionjava.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:
IndirectionExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionIndirectionExceptionjava.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:
readFieldsin classInputStreamHook- Throws:
java.io.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.IOExceptionCalled 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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.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)
-
-