Class CustomObjectInputStream
java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
com.thoughtworks.xstream.core.util.CustomObjectInputStream
- All Implemented Interfaces:
Closeable
,DataInput
,ObjectInput
,ObjectStreamConstants
,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
static interface
Nested classes/interfaces inherited from class java.io.ObjectInputStream
ObjectInputStream.GetField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FastStack
private final ClassLoaderReference
private static final String
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, SERIAL_FILTER_PERMISSION, 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
ConstructorsConstructorDescriptionCustomObjectInputStream
(CustomObjectInputStream.StreamCallback callback, ClassLoaderReference classLoaderReference) Warning, this object is expensive to create (due to functionality inherited from superclass).CustomObjectInputStream
(CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionint
Unsupported methodsvoid
close()
void
static CustomObjectInputStream
getInstance
(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback) Deprecated.As of 1.4 usegetInstance(DataHolder, StreamCallback, ClassLoader)
static CustomObjectInputStream
getInstance
(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoaderReference classLoaderReference) static CustomObjectInputStream
getInstance
(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) Deprecated.As of 1.4.5 usegetInstance(DataHolder, StreamCallback, ClassLoaderReference)
void
mark
(int readlimit) boolean
void
Allows the CustomObjectInputStream (which is expensive to create) to be reused.int
read()
int
read
(byte[] b) int
read
(byte[] buf, int off, int len) boolean
byte
readByte()
char
readChar()
double
float
void
readFully
(byte[] buf) void
readFully
(byte[] buf, int off, int len) int
readInt()
readLine()
long
readLong()
protected Object
short
int
int
readUTF()
void
registerValidation
(ObjectInputValidation validation, int priority) void
reset()
protected Class
long
skip
(long n) int
skipBytes
(int len) Methods inherited from class java.io.ObjectInputStream
enableResolveObject, getObjectInputFilter, readClassDescriptor, readObject, readStreamHeader, resolveObject, resolveProxyClass, setObjectInputFilter
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
callbacks
-
classLoaderReference
-
DATA_HOLDER_KEY
-
-
Constructor Details
-
CustomObjectInputStream
public CustomObjectInputStream(CustomObjectInputStream.StreamCallback callback, ClassLoaderReference classLoaderReference) throws IOException, SecurityException Warning, this object is expensive to create (due to functionality inherited from superclass). Use the static fetch() method instead, wherever possible.- Throws:
IOException
SecurityException
- See Also:
-
CustomObjectInputStream
public CustomObjectInputStream(CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) throws IOException, SecurityException Deprecated.As of 1.4.5 useCustomObjectInputStream(StreamCallback, ClassLoaderReference)
- Throws:
IOException
SecurityException
-
-
Method Details
-
getInstance
public static CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback) Deprecated.As of 1.4 usegetInstance(DataHolder, StreamCallback, ClassLoader)
-
getInstance
public static CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) Deprecated.As of 1.4.5 usegetInstance(DataHolder, StreamCallback, ClassLoaderReference)
-
getInstance
public static CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoaderReference classLoaderReference) -
pushCallback
Allows the CustomObjectInputStream (which is expensive to create) to be reused. -
popCallback
-
peekCallback
-
resolveClass
- Overrides:
resolveClass
in classObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
defaultReadObject
- Overrides:
defaultReadObject
in classObjectInputStream
- Throws:
IOException
-
readObjectOverride
- Overrides:
readObjectOverride
in classObjectInputStream
- Throws:
IOException
-
readBoolean
- Specified by:
readBoolean
in interfaceDataInput
- Overrides:
readBoolean
in classObjectInputStream
- Throws:
IOException
-
readByte
- Specified by:
readByte
in interfaceDataInput
- Overrides:
readByte
in classObjectInputStream
- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedByte
in interfaceDataInput
- Overrides:
readUnsignedByte
in classObjectInputStream
- Throws:
IOException
-
readInt
- Specified by:
readInt
in interfaceDataInput
- Overrides:
readInt
in classObjectInputStream
- Throws:
IOException
-
readChar
- Specified by:
readChar
in interfaceDataInput
- Overrides:
readChar
in classObjectInputStream
- Throws:
IOException
-
readFloat
- Specified by:
readFloat
in interfaceDataInput
- Overrides:
readFloat
in classObjectInputStream
- Throws:
IOException
-
readDouble
- Specified by:
readDouble
in interfaceDataInput
- Overrides:
readDouble
in classObjectInputStream
- Throws:
IOException
-
readLong
- Specified by:
readLong
in interfaceDataInput
- Overrides:
readLong
in classObjectInputStream
- Throws:
IOException
-
readShort
- Specified by:
readShort
in interfaceDataInput
- Overrides:
readShort
in classObjectInputStream
- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShort
in interfaceDataInput
- Overrides:
readUnsignedShort
in classObjectInputStream
- Throws:
IOException
-
readUTF
- Specified by:
readUTF
in interfaceDataInput
- Overrides:
readUTF
in classObjectInputStream
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Overrides:
readFully
in classObjectInputStream
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Overrides:
readFully
in classObjectInputStream
- Throws:
IOException
-
read
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classObjectInputStream
- Throws:
IOException
-
read
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classObjectInputStream
- Throws:
IOException
-
read
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readFields
- Overrides:
readFields
in classObjectInputStream
- Throws:
IOException
-
registerValidation
public void registerValidation(ObjectInputValidation validation, int priority) throws NotActiveException, InvalidObjectException - Overrides:
registerValidation
in classObjectInputStream
- Throws:
NotActiveException
InvalidObjectException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectInput
- Overrides:
close
in classObjectInputStream
- Throws:
IOException
-
available
public int available()Unsupported methods- Specified by:
available
in interfaceObjectInput
- Overrides:
available
in classObjectInputStream
-
readLine
- Specified by:
readLine
in interfaceDataInput
- Overrides:
readLine
in classObjectInputStream
-
skipBytes
public int skipBytes(int len) - Specified by:
skipBytes
in interfaceDataInput
- Overrides:
skipBytes
in classObjectInputStream
-
skip
public long skip(long n) - Specified by:
skip
in interfaceObjectInput
- Overrides:
skip
in classInputStream
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
reset
public void reset()- Overrides:
reset
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
CustomObjectInputStream(StreamCallback, ClassLoaderReference)