Class RiverUnmarshaller
- All Implemented Interfaces:
Closeable, DataInput, ObjectInput, AutoCloseable, ByteInput, Unmarshaller
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BlockUnmarshallerprivate final ArrayList<ClassDescriptor> private final PrivilegedExceptionAction<RiverObjectInputStream> private static final ReflectiveCreatorprivate intprivate RiverObjectInputStreamprivate static final Fieldprivate final SerializableClassRegistryprivate intprivate intFields inherited from class AbstractUnmarshaller
classExternalizerFactory, classResolver, classTable, configuredVersion, exceptionListener, objectPreResolver, objectResolver, objectTable, serializabilityChecker, streamHeaderFields inherited from class SimpleDataInput
buffer, limit, positionFields inherited from class ByteInputStream
byteInput -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRiverUnmarshaller(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddValidation(ObjectInputValidation validation, int prio) voidDiscard the class cache.voidDiscard the instance cache.voidclose()private RiverObjectInputStreamprotected voiddiscardFields(SerializableClassDescriptor descriptor) private voiddoInitSerializable(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) private ObjectdoReadArray(int cnt, boolean unshared, boolean discardMissing) private ObjectdoReadBooleanArray(int cnt, boolean unshared) private ObjectdoReadByteArray(int cnt, boolean unshared) private ObjectdoReadCharArray(int cnt, boolean unshared) (package private) ClassDescriptordoReadClassDescriptor(int classType, boolean required) (package private) ObjectdoReadCollectionObject(boolean unshared, int idx, int size, boolean discardMissing) private ObjectdoReadDoubleArray(int cnt, boolean unshared) private ObjectdoReadFloatArray(int cnt, boolean unshared) private ObjectdoReadIntArray(int cnt, boolean unshared) private ObjectdoReadLongArray(int cnt, boolean unshared) (package private) ObjectdoReadMapObject(boolean unshared, int idx, int size, boolean key, boolean discardMissing) (package private) ObjectdoReadNestedObject(boolean unshared, String enclosingClassName) protected ObjectdoReadNewObject(int streamClassType, boolean unshared, boolean discardMissing) protected ObjectdoReadObject(boolean unshared) Implementation of the actual object-reading method.(package private) ObjectdoReadObject(boolean unshared, boolean discardMissing) (package private) ObjectdoReadObject(int leadByte, boolean unshared, boolean discardMissing) private ObjectdoReadObjectArray(int cnt, Class<?> type, boolean unshared, boolean discardMissing) private ObjectdoReadShortArray(int cnt, boolean unshared) voidfinish()Finish reading from the current input.private BlockUnmarshallerprivate RiverObjectInputStreamprivate ObjectreadCollectionData(boolean unshared, int cacheIdx, int len, Collection target, boolean discardMissing) protected voidreadFields(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) private ObjectreadMapData(boolean unshared, int cacheIdx, int len, Map target, boolean discardMissing) private ObjectreadSortedMapData(boolean unshared, int cacheIdx, int len, SortedMap target, boolean discardMissing) private ObjectreadSortedSetData(boolean unshared, int cacheIdx, int len, SortedSet target, boolean discardMissing) protected StringreadUTF()private Objectprivate static EnumresolveEnumConstant(ClassDescriptor descriptor, String name) private static InvalidObjectExceptionvoidStart reading from the given input.Methods inherited from class AbstractObjectInput
readObject, readObject, readObjectUnshared, readObjectUnsharedMethods inherited from class SimpleDataInput
available, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readIntDirect, readLine, readLong, readLongDirect, readShort, readUnsignedByte, readUnsignedByteDirect, readUnsignedShort, skip, skipBytesMethods inherited from class InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferToMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, skipBytesMethods inherited from interface ObjectInput
available, read, read, read, readObject, skipMethods inherited from interface Unmarshaller
readObject, readObjectUnshared, readObjectUnshared
-
Field Details
-
DEFAULT_CREATOR
-
instanceCache
-
classCache
-
registry
-
version
private int version -
depth
private int depth -
blockUnmarshaller
-
objectInputStream
-
validators
-
validatorSeq
private int validatorSeq -
proxyInvocationHandler
-
createObjectInputStreamAction
-
-
Constructor Details
-
RiverUnmarshaller
protected RiverUnmarshaller(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration)
-
-
Method Details
-
clearInstanceCache
Description copied from interface:UnmarshallerDiscard the instance cache.- Throws:
IOException- if an error occurs
-
clearClassCache
Description copied from interface:UnmarshallerDiscard the class cache. Implicitly also discards the instance cache.- Throws:
IOException- if an error occurs
-
close
Description copied from class:SimpleDataInput- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectInput- Overrides:
closein classSimpleDataInput- Throws:
IOException
-
finish
Description copied from class:AbstractUnmarshallerFinish reading from the current input. The internal buffer is discarded, not flushed.- Specified by:
finishin interfaceUnmarshaller- Overrides:
finishin classAbstractUnmarshaller- Throws:
IOException- not thrown by this implementation, but may be overridden to be thrown if a problem occurs
-
getBlockUnmarshaller
-
getObjectInputStream
- Throws:
IOException
-
createObjectInputStream
- Throws:
IOException
-
doReadNestedObject
Object doReadNestedObject(boolean unshared, String enclosingClassName) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
doReadCollectionObject
Object doReadCollectionObject(boolean unshared, int idx, int size, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
doReadMapObject
Object doReadMapObject(boolean unshared, int idx, int size, boolean key, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
doReadObject
Description copied from class:AbstractObjectInputImplementation of the actual object-reading method.- Specified by:
doReadObjectin classAbstractObjectInput- Parameters:
unshared-trueif the instance should be unshared,falseif it is shared- Returns:
- the object to read
- Throws:
ClassNotFoundException- if the class for the object could not be loadedIOException- if an I/O error occurs
-
doReadObject
Object doReadObject(boolean unshared, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
doReadObject
Object doReadObject(int leadByte, boolean unshared, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
readCollectionData
private Object readCollectionData(boolean unshared, int cacheIdx, int len, Collection target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
readSortedSetData
private Object readSortedSetData(boolean unshared, int cacheIdx, int len, SortedSet target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
readMapData
private Object readMapData(boolean unshared, int cacheIdx, int len, Map target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
readSortedMapData
private Object readSortedMapData(boolean unshared, int cacheIdx, int len, SortedMap target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
doReadClassDescriptor
ClassDescriptor doReadClassDescriptor(int classType, boolean required) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
readString
- Throws:
IOException
-
start
Description copied from class:AbstractUnmarshallerStart reading from the given input. The internal buffer is discarded.- Specified by:
startin interfaceUnmarshaller- Overrides:
startin classAbstractUnmarshaller- Parameters:
byteInput- the new input from which to read- Throws:
IOException- not thrown by this implementation, but may be overridden to be thrown if a problem occurs
-
doReadNewObject
protected Object doReadNewObject(int streamClassType, boolean unshared, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
doReadDoubleArray
- Throws:
IOException
-
doReadFloatArray
- Throws:
IOException
-
doReadCharArray
- Throws:
IOException
-
doReadLongArray
- Throws:
IOException
-
doReadIntArray
- Throws:
IOException
-
doReadShortArray
- Throws:
IOException
-
doReadByteArray
- Throws:
IOException
-
doReadBooleanArray
- Throws:
IOException
-
doReadObjectArray
private Object doReadObjectArray(int cnt, Class<?> type, boolean unshared, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
doReadArray
private Object doReadArray(int cnt, boolean unshared, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundExceptionIOException
-
resolveEnumConstant
-
doInitSerializable
private void doInitSerializable(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
readFields
protected void readFields(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
discardFields
- Throws:
IOException
-
addValidation
-
readUTF
Description copied from class:SimpleDataInput- Specified by:
readUTFin interfaceDataInput- Overrides:
readUTFin classSimpleDataInput- Throws:
IOException
-
replace
-