public final class SerialUnmarshaller extends AbstractUnmarshaller implements Unmarshaller, ExtendedObjectStreamConstants
| Modifier and Type | Field and Description |
|---|---|
private BlockUnmarshaller |
blockUnmarshaller |
private java.security.PrivilegedExceptionAction<SerialObjectInputStream> |
createObjectOutputStreamAction |
private int |
depth |
private static int[] |
EMPTY_INTS |
private static java.lang.String[] |
EMPTY_STRINGS |
private java.util.ArrayList<java.lang.Object> |
instanceCache |
private SerialObjectInputStream |
ois |
private SerializableClassRegistry |
registry |
private static java.lang.Object |
UNRESOLVED |
private static java.lang.Object |
UNSHARED |
private java.util.SortedMap<java.lang.Integer,java.util.Set<java.io.ObjectInputValidation>> |
validationMap |
private int |
version |
classExternalizerFactory, classResolver, classTable, configuredVersion, exceptionListener, objectPreResolver, objectResolver, objectTable, serializabilityChecker, streamHeaderbuffer, limit, positionbyteInputTC_CLASSTABLEDESC, TC_OBJECTTABLEbaseWireHandle, 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 and Description |
|---|
SerialUnmarshaller(SerialMarshallerFactory factory,
SerializableClassRegistry registry,
MarshallingConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addValidation(java.io.ObjectInputValidation validation,
int prio) |
private java.io.StreamCorruptedException |
badLeadByte(int leadByte) |
private Descriptor |
bridge(Descriptor descriptor,
java.lang.Class<?> type) |
void |
clearClassCache()
Discard the class cache.
|
void |
clearInstanceCache()
Discard the instance cache.
|
void |
close() |
private SerialObjectInputStream |
createObjectInputStream() |
Descriptor |
descriptorForClass(java.lang.Class<?> clazz) |
protected java.lang.Object |
doReadObject(boolean unshared)
Implementation of the actual object-reading method.
|
(package private) java.lang.Object |
doReadObject(int leadByte,
boolean unshared) |
private void |
doReadSerialObject(Descriptor descriptor,
java.lang.Object obj) |
(package private) java.lang.String |
doReadString() |
void |
finish()
Finish reading from the current input.
|
(package private) BlockUnmarshaller |
getBlockUnmarshaller() |
(package private) SerialObjectInputStream |
getObjectInputStream() |
private static java.io.InvalidClassException |
objectStreamClassException() |
(package private) java.lang.Object |
readBackReference(int handle) |
private Descriptor |
readClassDescriptor(boolean required) |
private Descriptor |
readClassDescriptor(int leadByte,
boolean required) |
private Descriptor |
readNonNullClassDescriptor() |
private java.lang.Object |
replaceOrReturn(boolean unshared,
java.lang.Object object) |
private java.lang.Object |
replaceOrReturn(boolean unshared,
java.lang.Object object,
int idx) |
void |
start(ByteInput byteInput)
Start reading from the given input.
|
readObject, readObject, readObjectUnshared, readObjectUnsharedavailable, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readIntDirect, readLine, readLong, readLongDirect, readShort, readUnsignedByte, readUnsignedByteDirect, readUnsignedShort, readUTF, skip, skipBytesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadObject, readObjectUnshared, readObjectUnsharedprivate static final java.lang.Object UNSHARED
private static final java.lang.Object UNRESOLVED
private final java.util.ArrayList<java.lang.Object> instanceCache
private final SerializableClassRegistry registry
private int depth
private SerialObjectInputStream ois
private BlockUnmarshaller blockUnmarshaller
private int version
private static final int[] EMPTY_INTS
private static final java.lang.String[] EMPTY_STRINGS
private final java.security.PrivilegedExceptionAction<SerialObjectInputStream> createObjectOutputStreamAction
private final java.util.SortedMap<java.lang.Integer,java.util.Set<java.io.ObjectInputValidation>> validationMap
SerialUnmarshaller(SerialMarshallerFactory factory, SerializableClassRegistry registry, MarshallingConfiguration configuration)
protected java.lang.Object doReadObject(boolean unshared)
throws java.lang.ClassNotFoundException,
java.io.IOException
AbstractObjectInputdoReadObject in class AbstractObjectInputunshared - true if the instance should be unshared, false if it is sharedjava.lang.ClassNotFoundException - if the class for the object could not be loadedjava.io.IOException - if an I/O error occursjava.lang.String doReadString()
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.Object readBackReference(int handle)
throws java.io.IOException
java.io.IOExceptionjava.lang.Object doReadObject(int leadByte,
boolean unshared)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionprivate void doReadSerialObject(Descriptor descriptor, java.lang.Object obj) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionprivate static java.io.InvalidClassException objectStreamClassException()
private Descriptor readNonNullClassDescriptor() throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionprivate Descriptor readClassDescriptor(boolean required) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionprivate Descriptor readClassDescriptor(int leadByte, boolean required) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionprivate Descriptor bridge(Descriptor descriptor, java.lang.Class<?> type)
private java.io.StreamCorruptedException badLeadByte(int leadByte)
public void clearInstanceCache()
throws java.io.IOException
UnmarshallerclearInstanceCache in interface Unmarshallerjava.io.IOException - if an error occurspublic void clearClassCache()
throws java.io.IOException
UnmarshallerclearClassCache in interface Unmarshallerjava.io.IOException - if an error occurspublic void start(ByteInput byteInput) throws java.io.IOException
AbstractUnmarshallerstart in interface Unmarshallerstart in class AbstractUnmarshallerbyteInput - the new input from which to readjava.io.IOException - not thrown by this implementation, but may be overridden to be thrown if a problem occurspublic void finish()
throws java.io.IOException
AbstractUnmarshallerfinish in interface Unmarshallerfinish in class AbstractUnmarshallerjava.io.IOException - not thrown by this implementation, but may be overridden to be thrown if a problem occurspublic void close()
throws java.io.IOException
SimpleDataInputclose in interface java.io.Closeableclose in interface java.io.ObjectInputclose in interface java.lang.AutoCloseableclose in class SimpleDataInputjava.io.IOExceptionBlockUnmarshaller getBlockUnmarshaller()
private SerialObjectInputStream createObjectInputStream() throws java.io.IOException
java.io.IOExceptionSerialObjectInputStream getObjectInputStream() throws java.io.IOException
java.io.IOExceptionvoid addValidation(java.io.ObjectInputValidation validation,
int prio)
public Descriptor descriptorForClass(java.lang.Class<?> clazz)
private java.lang.Object replaceOrReturn(boolean unshared,
java.lang.Object object)
private java.lang.Object replaceOrReturn(boolean unshared,
java.lang.Object object,
int idx)