Package java.io
Class ObjectInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ObjectInputStream
-
- All Implemented Interfaces:
DataInput
,ObjectInput
,ObjectStreamConstants
public class ObjectInputStream extends InputStream implements ObjectInput, ObjectStreamConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectInputStream.GetField
-
Field Summary
-
Fields inherited from interface java.io.ObjectStreamConstants
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ObjectInputStream()
ObjectInputStream(InputStream var0)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
void
defaultReadObject()
protected boolean
enableResolveObject(boolean var0)
int
read()
int
read(byte[] var0, int var1, int var2)
boolean
readBoolean()
byte
readByte()
char
readChar()
protected ObjectStreamClass
readClassDescriptor()
double
readDouble()
ObjectInputStream.GetField
readFields()
float
readFloat()
void
readFully(byte[] var0)
void
readFully(byte[] var0, int var1, int var2)
int
readInt()
String
readLine()
long
readLong()
Object
readObject()
protected Object
readObjectOverride()
short
readShort()
protected void
readStreamHeader()
int
readUnsignedByte()
int
readUnsignedShort()
String
readUTF()
void
registerValidation(ObjectInputValidation var0, int var1)
protected Class
resolveClass(ObjectStreamClass var0)
protected Object
resolveObject(Object var0)
protected Class
resolveProxyClass(String[] var0)
int
skipBytes(int var0)
-
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.ObjectInput
read, skip
-
-
-
-
Constructor Detail
-
ObjectInputStream
protected ObjectInputStream() throws IOException, SecurityException
- Throws:
IOException
SecurityException
-
ObjectInputStream
public ObjectInputStream(InputStream var0) throws StreamCorruptedException, IOException
- Throws:
StreamCorruptedException
IOException
-
-
Method Detail
-
available
public int available() throws IOException
- Specified by:
available
in interfaceObjectInput
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceObjectInput
- Overrides:
close
in classInputStream
- Throws:
IOException
-
defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundException, NotActiveException
-
enableResolveObject
protected boolean enableResolveObject(boolean var0) throws SecurityException
- Throws:
SecurityException
-
read
public int read() throws IOException
- Specified by:
read
in interfaceObjectInput
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] var0, int var1, int var2) throws IOException
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
public byte readByte() throws IOException
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readChar
public char readChar() throws IOException
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readDouble
public double readDouble() throws IOException
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readFields
public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException, NotActiveException
-
readFloat
public float readFloat() throws IOException
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readFully
public void readFully(byte[] var0) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
public void readFully(byte[] var0, int var1, int var2) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readInt
public int readInt() throws IOException
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLine
public String readLine() throws IOException
- Specified by:
readLine
in interfaceDataInput
- Throws:
IOException
-
readLong
public long readLong() throws IOException
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readClassDescriptor
protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
resolveProxyClass
protected Class resolveProxyClass(String[] var0) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
readObject
public final Object readObject() throws OptionalDataException, ClassNotFoundException, IOException
- Specified by:
readObject
in interfaceObjectInput
- Throws:
OptionalDataException
ClassNotFoundException
IOException
-
readObjectOverride
protected Object readObjectOverride() throws OptionalDataException, ClassNotFoundException, IOException
-
readShort
public short readShort() throws IOException
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readStreamHeader
protected void readStreamHeader() throws IOException, StreamCorruptedException
- Throws:
IOException
StreamCorruptedException
-
readUnsignedByte
public int readUnsignedByte() throws IOException
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
registerValidation
public void registerValidation(ObjectInputValidation var0, int var1) throws NotActiveException, InvalidObjectException
-
resolveClass
protected Class resolveClass(ObjectStreamClass var0) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
resolveObject
protected Object resolveObject(Object var0) throws IOException
- Throws:
IOException
-
skipBytes
public int skipBytes(int var0) throws IOException
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
-