Package org.jboss.marshalling.river
Class RiverUnmarshaller
- All Implemented Interfaces:
Closeable
,DataInput
,ObjectInput
,AutoCloseable
,ByteInput
,Unmarshaller
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BlockUnmarshaller
private final ArrayList
<ClassDescriptor> private final PrivilegedExceptionAction
<RiverObjectInputStream> private static final ReflectiveCreator
private int
private RiverObjectInputStream
private static final Field
private final SerializableClassRegistry
private int
private int
Fields inherited from class org.jboss.marshalling.AbstractUnmarshaller
classExternalizerFactory, classResolver, classTable, configuredVersion, exceptionListener, objectPreResolver, objectResolver, objectTable, serializabilityChecker, streamHeader
Fields inherited from class org.jboss.marshalling.SimpleDataInput
buffer, limit, position
Fields inherited from class org.jboss.marshalling.ByteInputStream
byteInput
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RiverUnmarshaller
(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescription(package private) void
addValidation
(ObjectInputValidation validation, int prio) void
Discard the class cache.void
Discard the instance cache.void
close()
private RiverObjectInputStream
protected void
discardFields
(SerializableClassDescriptor descriptor) private void
doInitSerializable
(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) private Object
doReadArray
(int cnt, boolean unshared, boolean discardMissing) private Object
doReadBooleanArray
(int cnt, boolean unshared) private Object
doReadByteArray
(int cnt, boolean unshared) private Object
doReadCharArray
(int cnt, boolean unshared) (package private) ClassDescriptor
doReadClassDescriptor
(int classType, boolean required) (package private) Object
doReadCollectionObject
(boolean unshared, int idx, int size, boolean discardMissing) private Object
doReadDoubleArray
(int cnt, boolean unshared) private Object
doReadFloatArray
(int cnt, boolean unshared) private Object
doReadIntArray
(int cnt, boolean unshared) private Object
doReadLongArray
(int cnt, boolean unshared) (package private) Object
doReadMapObject
(boolean unshared, int idx, int size, boolean key, boolean discardMissing) (package private) Object
doReadNestedObject
(boolean unshared, String enclosingClassName) protected Object
doReadNewObject
(int streamClassType, boolean unshared, boolean discardMissing) protected Object
doReadObject
(boolean unshared) Implementation of the actual object-reading method.(package private) Object
doReadObject
(boolean unshared, boolean discardMissing) (package private) Object
doReadObject
(int leadByte, boolean unshared, boolean discardMissing) private Object
doReadObjectArray
(int cnt, Class<?> type, boolean unshared, boolean discardMissing) private Object
doReadShortArray
(int cnt, boolean unshared) void
finish()
Finish reading from the current input.private BlockUnmarshaller
private RiverObjectInputStream
private Object
readCollectionData
(boolean unshared, int cacheIdx, int len, Collection target, boolean discardMissing) protected void
readFields
(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) private Object
readMapData
(boolean unshared, int cacheIdx, int len, Map target, boolean discardMissing) private Object
readSortedMapData
(boolean unshared, int cacheIdx, int len, SortedMap target, boolean discardMissing) private Object
readSortedSetData
(boolean unshared, int cacheIdx, int len, SortedSet target, boolean discardMissing) protected String
readUTF()
private Object
private static Enum
resolveEnumConstant
(ClassDescriptor descriptor, String name) private static InvalidObjectException
void
Start reading from the given input.Methods inherited from class org.jboss.marshalling.AbstractObjectInput
readObject, readObject, readObjectUnshared, readObjectUnshared
Methods inherited from class org.jboss.marshalling.SimpleDataInput
available, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readIntDirect, readLine, readLong, readLongDirect, readShort, readUnsignedByte, readUnsignedByteDirect, readUnsignedShort, skip, skipBytes
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, skipBytes
Methods inherited from interface java.io.ObjectInput
available, read, read, read, readObject, skip
Methods inherited from interface org.jboss.marshalling.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:Unmarshaller
Discard the instance cache.- Throws:
IOException
- if an error occurs
-
clearClassCache
Description copied from interface:Unmarshaller
Discard the class cache. Implicitly also discards the instance cache.- Throws:
IOException
- if an error occurs
-
close
Description copied from class:SimpleDataInput
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectInput
- Overrides:
close
in classSimpleDataInput
- Throws:
IOException
-
finish
Description copied from class:AbstractUnmarshaller
Finish reading from the current input. The internal buffer is discarded, not flushed.- Specified by:
finish
in interfaceUnmarshaller
- Overrides:
finish
in 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:
ClassNotFoundException
IOException
-
doReadCollectionObject
Object doReadCollectionObject(boolean unshared, int idx, int size, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
doReadMapObject
Object doReadMapObject(boolean unshared, int idx, int size, boolean key, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
doReadObject
Description copied from class:AbstractObjectInput
Implementation of the actual object-reading method.- Specified by:
doReadObject
in classAbstractObjectInput
- Parameters:
unshared
-true
if the instance should be unshared,false
if 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:
IOException
ClassNotFoundException
-
doReadObject
Object doReadObject(int leadByte, boolean unshared, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
readCollectionData
private Object readCollectionData(boolean unshared, int cacheIdx, int len, Collection target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
readSortedSetData
private Object readSortedSetData(boolean unshared, int cacheIdx, int len, SortedSet target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
readMapData
private Object readMapData(boolean unshared, int cacheIdx, int len, Map target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
readSortedMapData
private Object readSortedMapData(boolean unshared, int cacheIdx, int len, SortedMap target, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
doReadClassDescriptor
ClassDescriptor doReadClassDescriptor(int classType, boolean required) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
readString
- Throws:
IOException
-
start
Description copied from class:AbstractUnmarshaller
Start reading from the given input. The internal buffer is discarded.- Specified by:
start
in interfaceUnmarshaller
- Overrides:
start
in 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:
ClassNotFoundException
IOException
-
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:
ClassNotFoundException
IOException
-
doReadArray
private Object doReadArray(int cnt, boolean unshared, boolean discardMissing) throws ClassNotFoundException, IOException - Throws:
ClassNotFoundException
IOException
-
resolveEnumConstant
-
doInitSerializable
private void doInitSerializable(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
readFields
protected void readFields(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
discardFields
- Throws:
IOException
-
addValidation
-
readUTF
Description copied from class:SimpleDataInput
- Specified by:
readUTF
in interfaceDataInput
- Overrides:
readUTF
in classSimpleDataInput
- Throws:
IOException
-
replace
-