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 classstatic interfaceNested classes/interfaces inherited from class ObjectInputStream
ObjectInputStream.GetField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FastStackprivate final ClassLoaderReferenceprivate static final StringFields inherited from interface 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 TypeMethodDescriptionintUnsupported methodsvoidclose()voidstatic CustomObjectInputStreamgetInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback) Deprecated.As of 1.4 usegetInstance(DataHolder, StreamCallback, ClassLoader)static CustomObjectInputStreamgetInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoaderReference classLoaderReference) static CustomObjectInputStreamgetInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) Deprecated.As of 1.4.5 usegetInstance(DataHolder, StreamCallback, ClassLoaderReference)voidmark(int readlimit) booleanvoidAllows the CustomObjectInputStream (which is expensive to create) to be reused.intread()intread(byte[] b) intread(byte[] buf, int off, int len) booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] buf) voidreadFully(byte[] buf, int off, int len) intreadInt()readLine()longreadLong()protected ObjectshortintintreadUTF()voidregisterValidation(ObjectInputValidation validation, int priority) voidreset()protected Classlongskip(long n) intskipBytes(int len) Methods inherited from class ObjectInputStream
enableResolveObject, getObjectInputFilter, readClassDescriptor, readObject, readStreamHeader, resolveObject, resolveProxyClass, setObjectInputFilterMethods inherited from class 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:
IOExceptionSecurityException- See Also:
-
CustomObjectInputStream
public CustomObjectInputStream(CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) throws IOException, SecurityException Deprecated.As of 1.4.5 useCustomObjectInputStream(StreamCallback, ClassLoaderReference)- Throws:
IOExceptionSecurityException
-
-
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:
resolveClassin classObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
defaultReadObject
- Overrides:
defaultReadObjectin classObjectInputStream- Throws:
IOException
-
readObjectOverride
- Overrides:
readObjectOverridein classObjectInputStream- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Overrides:
readBooleanin classObjectInputStream- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Overrides:
readBytein classObjectInputStream- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Overrides:
readUnsignedBytein classObjectInputStream- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Overrides:
readIntin classObjectInputStream- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Overrides:
readCharin classObjectInputStream- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Overrides:
readFloatin classObjectInputStream- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Overrides:
readDoublein classObjectInputStream- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Overrides:
readLongin classObjectInputStream- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Overrides:
readShortin classObjectInputStream- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Overrides:
readUnsignedShortin classObjectInputStream- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Overrides:
readUTFin classObjectInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectInput- Overrides:
readin classInputStream- Throws:
IOException
-
readFields
- Overrides:
readFieldsin classObjectInputStream- Throws:
IOException
-
registerValidation
public void registerValidation(ObjectInputValidation validation, int priority) throws NotActiveException, InvalidObjectException - Overrides:
registerValidationin classObjectInputStream- Throws:
NotActiveExceptionInvalidObjectException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectInput- Overrides:
closein classObjectInputStream- Throws:
IOException
-
available
public int available()Unsupported methods- Specified by:
availablein interfaceObjectInput- Overrides:
availablein classObjectInputStream
-
readLine
- Specified by:
readLinein interfaceDataInput- Overrides:
readLinein classObjectInputStream
-
skipBytes
public int skipBytes(int len) - Specified by:
skipBytesin interfaceDataInput- Overrides:
skipBytesin classObjectInputStream
-
skip
public long skip(long n) - Specified by:
skipin interfaceObjectInput- Overrides:
skipin classInputStream
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
public void reset()- Overrides:
resetin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
CustomObjectInputStream(StreamCallback, ClassLoaderReference)