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 int
available()
void
close()
void
defaultReadObject()
boolean
equals(Object obj)
int
hashCode()
void
mark(int readlimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] buf, int off, int len)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
ObjectInputStream.GetField
readFields()
float
readFloat()
void
readFully(byte[] buf)
void
readFully(byte[] buf, int off, int len)
int
readInt()
String
readLine()
long
readLong()
protected Object
readObjectOverride()
short
readShort()
Object
readUnshared()
int
readUnsignedByte()
int
readUnsignedShort()
String
readUTF()
void
registerValidation(ObjectInputValidation obj, int prio)
void
reset()
long
skip(long n)
int
skipBytes(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:
readObjectOverride
in classObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
readUnshared
public Object readUnshared() throws IOException, ClassNotFoundException
- Overrides:
readUnshared
in classObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundException
- Overrides:
defaultReadObject
in classObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
readFields
public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException
- Overrides:
readFields
in classObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
registerValidation
public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException
- Overrides:
registerValidation
in classObjectInputStream
- Throws:
NotActiveException
InvalidObjectException
-
read
public int read() throws IOException
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classObjectInputStream
- Throws:
IOException
-
read
public int read(byte[] buf, int off, int len) throws IOException
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classObjectInputStream
- Throws:
IOException
-
available
public int available() throws IOException
- Specified by:
available
in interfaceObjectInput
- Overrides:
available
in classObjectInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectInput
- Overrides:
close
in classObjectInputStream
- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException
- Specified by:
readBoolean
in interfaceDataInput
- Overrides:
readBoolean
in classObjectInputStream
- Throws:
IOException
-
readByte
public byte readByte() throws IOException
- Specified by:
readByte
in interfaceDataInput
- Overrides:
readByte
in classObjectInputStream
- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOException
- Specified by:
readUnsignedByte
in interfaceDataInput
- Overrides:
readUnsignedByte
in classObjectInputStream
- Throws:
IOException
-
readChar
public char readChar() throws IOException
- Specified by:
readChar
in interfaceDataInput
- Overrides:
readChar
in classObjectInputStream
- Throws:
IOException
-
readShort
public short readShort() throws IOException
- Specified by:
readShort
in interfaceDataInput
- Overrides:
readShort
in classObjectInputStream
- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException
- Specified by:
readUnsignedShort
in interfaceDataInput
- Overrides:
readUnsignedShort
in classObjectInputStream
- Throws:
IOException
-
readInt
public int readInt() throws IOException
- Specified by:
readInt
in interfaceDataInput
- Overrides:
readInt
in classObjectInputStream
- Throws:
IOException
-
readLong
public long readLong() throws IOException
- Specified by:
readLong
in interfaceDataInput
- Overrides:
readLong
in classObjectInputStream
- Throws:
IOException
-
readFloat
public float readFloat() throws IOException
- Specified by:
readFloat
in interfaceDataInput
- Overrides:
readFloat
in classObjectInputStream
- Throws:
IOException
-
readDouble
public double readDouble() throws IOException
- Specified by:
readDouble
in interfaceDataInput
- Overrides:
readDouble
in classObjectInputStream
- Throws:
IOException
-
readFully
public void readFully(byte[] buf) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Overrides:
readFully
in classObjectInputStream
- Throws:
IOException
-
readFully
public void readFully(byte[] buf, int off, int len) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Overrides:
readFully
in classObjectInputStream
- Throws:
IOException
-
skipBytes
public int skipBytes(int len) throws IOException
- Specified by:
skipBytes
in interfaceDataInput
- Overrides:
skipBytes
in classObjectInputStream
- Throws:
IOException
-
readLine
public String readLine() throws IOException
- Specified by:
readLine
in interfaceDataInput
- Overrides:
readLine
in classObjectInputStream
- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTF
in interfaceDataInput
- Overrides:
readUTF
in classObjectInputStream
- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Specified by:
skip
in interfaceObjectInput
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
mark
in classInputStream
-
reset
public void reset() throws IOException
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
-
-