public class ObjectInputStream extends InputStream implements ObjectInput, ObjectStreamConstants
Modifier and Type | Class and Description |
---|---|
static class |
ObjectInputStream.GetField |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, 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_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Modifier | Constructor and Description |
---|---|
protected |
ObjectInputStream() |
|
ObjectInputStream(InputStream in) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
defaultReadObject() |
protected boolean |
enableResolveObject(boolean enable) |
int |
read() |
int |
read(byte[] b,
int off,
int size) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
protected ObjectStreamClass |
readClassDescriptor() |
double |
readDouble() |
ObjectInputStream.GetField |
readFields() |
float |
readFloat() |
void |
readFully(byte[] data) |
void |
readFully(byte[] data,
int offset,
int size) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
Object |
readObject() |
protected Object |
readObjectOverride()
default implementation returns null
|
short |
readShort() |
protected void |
readStreamHeader() |
Object |
readUnshared() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
registerValidation(ObjectInputValidation obj,
int prio) |
protected Class |
resolveClass(ObjectStreamClass osc) |
protected Object |
resolveObject(Object obj)
the default behaviour is to return the same object
|
protected Class |
resolveProxyClass(String[] interfaces) |
int |
skipBytes(int len) |
mark, markSupported, read, reset, skip
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, skip
protected ObjectInputStream() throws IOException
IOException
public ObjectInputStream(InputStream in) throws IOException, StreamCorruptedException
IOException
StreamCorruptedException
public int available() throws IOException
available
in interface ObjectInput
available
in class InputStream
IOException
public void close() throws IOException
close
in interface ObjectInput
close
in class InputStream
IOException
public void defaultReadObject() throws IOException, NotActiveException, ClassNotFoundException
public Object readUnshared() throws ClassNotFoundException, IOException
ClassNotFoundException
IOException
protected boolean enableResolveObject(boolean enable) throws SecurityException
SecurityException
public int read() throws IOException
read
in interface ObjectInput
read
in class InputStream
IOException
public int read(byte[] b, int off, int size) throws IOException
read
in interface ObjectInput
read
in class InputStream
IOException
public boolean readBoolean() throws IOException
readBoolean
in interface DataInput
IOException
public byte readByte() throws IOException
readByte
in interface DataInput
IOException
public char readChar() throws IOException
readChar
in interface DataInput
IOException
protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public double readDouble() throws IOException
readDouble
in interface DataInput
IOException
public ObjectInputStream.GetField readFields() throws NotActiveException, IOException, ClassNotFoundException
public float readFloat() throws IOException
readFloat
in interface DataInput
IOException
public void readFully(byte[] data) throws IOException
readFully
in interface DataInput
IOException
public void readFully(byte[] data, int offset, int size) throws IOException
readFully
in interface DataInput
IOException
public int readInt() throws IOException
readInt
in interface DataInput
IOException
public String readLine() throws IOException
readLine
in interface DataInput
IOException
public long readLong() throws IOException
readLong
in interface DataInput
IOException
public final Object readObject() throws OptionalDataException, ClassNotFoundException, IOException
readObject
in interface ObjectInput
OptionalDataException
ClassNotFoundException
IOException
protected Object readObjectOverride() throws OptionalDataException, ClassNotFoundException, IOException
public short readShort() throws IOException
readShort
in interface DataInput
IOException
protected void readStreamHeader() throws IOException, StreamCorruptedException
IOException
StreamCorruptedException
public int readUnsignedByte() throws IOException
readUnsignedByte
in interface DataInput
IOException
public int readUnsignedShort() throws IOException
readUnsignedShort
in interface DataInput
IOException
public String readUTF() throws IOException
readUTF
in interface DataInput
IOException
public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException
protected Class resolveClass(ObjectStreamClass osc) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected Object resolveObject(Object obj) throws IOException
IOException
protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public int skipBytes(int len) throws IOException
skipBytes
in interface DataInput
IOException