ObjectInputStream (Java SE 24 & JDK 24)
- All Implemented Interfaces:
Closeable,DataInput,ObjectInput,ObjectStreamConstants,AutoCloseable
-
Nested Class Summary
Nested Classes
static classProvide access to the persistent fields read from the input stream.
-
Field Summary
Fields declared in 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
protectedProvide a way for subclasses that are completely reimplementing ObjectInputStream to not have to allocate private data just used by this implementation of ObjectInputStream.
Creates an ObjectInputStream that reads from the specified InputStream.
-
Method Summary
intReturns the number of bytes that can be read without blocking.
voidclose()Closes this input stream and releases any system resources associated with the stream.
voidRead the non-static and non-transient fields of the current class from this stream.
protected booleanenableResolveObject(boolean enable) Enables the stream to do replacement of objects read from the stream.
Returns the deserialization filter for this stream.
intread()intread(byte[] buf, int off, int len) Reads into an array of bytes.
booleanbytereadByte()charreadChar()Read a class descriptor from the serialization stream.
doubleReads the persistent fields from the stream and makes them available by name.
floatvoidreadFully(byte[] buf) Reads bytes, blocking until all bytes are read.
voidreadFully(byte[] buf, int off, int len) Reads bytes, blocking until all bytes are read.
intreadInt()readLine()longreadLong()Read an object from the ObjectInputStream.
This method is called by trusted subclasses of ObjectInputStream that constructed ObjectInputStream using the protected no-arg constructor.
shortprotected voidThe readStreamHeader method is provided to allow subclasses to read and verify their own stream headers.
Reads an "unshared" object from the ObjectInputStream.
intReads an unsigned 8-bit byte.
intReads an unsigned 16-bit short.
readUTF()voidRegister an object to be validated before the graph is returned.
Load the local class equivalent of the specified stream class description.
This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization.
Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.
final voidSet the deserialization filter for the stream.
intskipBytes(int len) Methods declared in class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ObjectInputStream
-
ObjectInputStream
-
-
Method Details
-
readObject
-
readObjectOverride
-
defaultReadObject
-
readFields
-
registerValidation
-
resolveClass
-
resolveProxyClass
-
resolveObject
-
enableResolveObject
-
readClassDescriptor
-
read
-
read
-
available
-
close
-
readBoolean
-
readByte
-
readUnsignedByte
-
readChar
-
readShort
-
readUnsignedShort
-
readInt
-
readLong
-
readFloat
-
readDouble
-
readFully
-
readFully
-
skipBytes
-
readLine
-
readUTF
-
getObjectInputFilter
-
setObjectInputFilter
-