Class ResettableObjectInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ObjectInputStream
-
- org.glassfish.contextpropagation.wireadapters.ResettableObjectInputStream
-
- All Implemented Interfaces:
Closeable,DataInput,ObjectInput,ObjectStreamConstants,AutoCloseable
public class ResettableObjectInputStream extends ObjectInputStream
An ObjectInputStream implementation with some support for reset method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.io.ObjectInputStream
ObjectInputStream.GetField
-
-
Field Summary
-
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
Constructors Constructor Description ResettableObjectInputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()voiddefaultReadObject()booleanequals(Object obj)inthashCode()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] buf, int off, int len)booleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()ObjectInputStream.GetFieldreadFields()floatreadFloat()voidreadFully(byte[] buf)voidreadFully(byte[] buf, int off, int len)intreadInt()StringreadLine()longreadLong()protected ObjectreadObjectOverride()shortreadShort()ObjectreadUnshared()intreadUnsignedByte()intreadUnsignedShort()StringreadUTF()voidregisterValidation(ObjectInputValidation obj, int prio)voidreset()longskip(long n)intskipBytes(int len)-
Methods inherited from class java.io.ObjectInputStream
enableResolveObject, getObjectInputFilter, readClassDescriptor, readObject, readStreamHeader, resolveClass, resolveObject, resolveProxyClass, setObjectInputFilter
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ResettableObjectInputStream
public ResettableObjectInputStream(InputStream in) throws IOException
- Throws:
IOException
-
-
Method Detail
-
readObjectOverride
protected Object readObjectOverride() throws IOException, ClassNotFoundException
- Overrides:
readObjectOverridein classObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
readUnshared
public Object readUnshared() throws IOException, ClassNotFoundException
- Overrides:
readUnsharedin classObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundException- Overrides:
defaultReadObjectin classObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
readFields
public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException
- Overrides:
readFieldsin classObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
registerValidation
public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException
- Overrides:
registerValidationin classObjectInputStream- Throws:
NotActiveExceptionInvalidObjectException
-
read
public int read() throws IOException- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
read
public int read(byte[] buf, int off, int len) throws IOException- Specified by:
readin interfaceObjectInput- Overrides:
readin classObjectInputStream- Throws:
IOException
-
available
public int available() throws IOException- Specified by:
availablein interfaceObjectInput- Overrides:
availablein classObjectInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectInput- Overrides:
closein classObjectInputStream- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException- Specified by:
readBooleanin interfaceDataInput- Overrides:
readBooleanin classObjectInputStream- Throws:
IOException
-
readByte
public byte readByte() throws IOException- Specified by:
readBytein interfaceDataInput- Overrides:
readBytein classObjectInputStream- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOException- Specified by:
readUnsignedBytein interfaceDataInput- Overrides:
readUnsignedBytein classObjectInputStream- Throws:
IOException
-
readChar
public char readChar() throws IOException- Specified by:
readCharin interfaceDataInput- Overrides:
readCharin classObjectInputStream- Throws:
IOException
-
readShort
public short readShort() throws IOException- Specified by:
readShortin interfaceDataInput- Overrides:
readShortin classObjectInputStream- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException- Specified by:
readUnsignedShortin interfaceDataInput- Overrides:
readUnsignedShortin classObjectInputStream- Throws:
IOException
-
readInt
public int readInt() throws IOException- Specified by:
readIntin interfaceDataInput- Overrides:
readIntin classObjectInputStream- Throws:
IOException
-
readLong
public long readLong() throws IOException- Specified by:
readLongin interfaceDataInput- Overrides:
readLongin classObjectInputStream- Throws:
IOException
-
readFloat
public float readFloat() throws IOException- Specified by:
readFloatin interfaceDataInput- Overrides:
readFloatin classObjectInputStream- Throws:
IOException
-
readDouble
public double readDouble() throws IOException- Specified by:
readDoublein interfaceDataInput- Overrides:
readDoublein classObjectInputStream- Throws:
IOException
-
readFully
public void readFully(byte[] buf) throws IOException- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
readFully
public void readFully(byte[] buf, int off, int len) throws IOException- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classObjectInputStream- Throws:
IOException
-
skipBytes
public int skipBytes(int len) throws IOException- Specified by:
skipBytesin interfaceDataInput- Overrides:
skipBytesin classObjectInputStream- Throws:
IOException
-
readLine
public String readLine() throws IOException
- Specified by:
readLinein interfaceDataInput- Overrides:
readLinein classObjectInputStream- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTFin interfaceDataInput- Overrides:
readUTFin classObjectInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Specified by:
readin interfaceObjectInput- Overrides:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Specified by:
skipin interfaceObjectInput- Overrides:
skipin classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
-