java.io.Serializable .
This class is not part of the marshalling API; rather it is intended for marshaller implementers to make it easier to develop Java serialization-compatible marshallers.
| Modifier and Type | Field and Description |
|---|---|
| private final Unmarshaller |
| Access | Constructor and Description |
|---|---|
| protected | MarshallerObjectInputStream(final Unmarshaller
the delegate unmarshaller input)Construct a new instance which delegates to the given unmarshaller. |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Implements org. |
| public final void | close()
Overrides java. Implements java. |
| public abstract void | defaultReadObject()
Overrides java. |
| protected final boolean | enableResolveObject(final boolean
true for enabling use of enable)
Enables the stream to do replacement of objects read from the stream.
resolveObject for
every object being deserialized |
| public final void | mark(final int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readlimit)Overrides java. |
| public final boolean | markSupported()
Overrides java. mark and
reset methods.
|
| public int | read()
Overrides java. Implements org. |
| public int | read(final byte[]
the destination array buf)Overrides java. Implements org. |
| public int | read(final byte[]
the destination array buf, final int the offset into the array into which data should be read off, final int the number of bytes to attempt to fill in the destination array len)Overrides java. Implements org. |
| public boolean | readBoolean()
Overrides java. Implements java. |
| public byte | readByte()
Overrides java. Implements java. |
| public char | readChar()
Overrides java. Implements java. |
| protected final ObjectStreamClass | readClassDescriptor()
Read a class descriptor from the serialization stream.
|
| public double | readDouble()
Overrides java. Implements java. |
| public abstract ObjectInputStream. | readFields()
Overrides java. |
| public float | readFloat()
Overrides java. Implements java. |
| public void | readFully(final byte[]
the buffer into which the data is read buf)Overrides java. Implements java. |
| public void | readFully(final byte[]
the buffer into which the data is read buf, final int the start offset into the data array off, final int bufthe maximum number of bytes to read len)Overrides java. Implements java. |
| public int | readInt()
Overrides java. Implements java. |
| public String | readLine()
Overrides java. Implements java.
Deprecated
Reads in a line that has been terminated by a \n, \r, \r\n or EOF.
|
| public long | readLong()
Overrides java. Implements java. |
| protected Object | readObjectOverride()
Overrides java. |
| public short | readShort()
Overrides java. Implements java. |
| protected final void | readStreamHeader()
Overrides java. |
| public Object | readUnshared()
Overrides java. |
| public int | readUnsignedByte()
Overrides java. Implements java. |
| public int | readUnsignedShort()
Overrides java. Implements java. |
| public String | readUTF()
Overrides java. Implements java. |
| public abstract void | registerValidation(final ObjectInputValidation
the object to receive the validation callback. obj, final int controls the order of callbacks; zero is a good default.
Use higher numbers to be called back earlier, lower numbers for
later callbacks. Within a priority, callbacks are processed in
no particular order. prio)Overrides java. |
| public final void | reset()
Overrides java. mark method was last called on this input stream.
|
| protected final Class | resolveClass(final ObjectStreamClass
an instance of class desc)ObjectStreamClassOverrides java. |
| protected final Object | resolveObject(final Object
object to be substituted obj)Overrides java. |
| protected final Class | resolveProxyClass(final String[]
the list of interface names that were
deserialized in the proxy class descriptor interfaces)Overrides java. |
| public long | skip(final long
the number of bytes to attempt to skip n)Overrides java. Implements org. n bytes of data from this input stream.
|
| public int | skipBytes(final int
the number of bytes to be skipped len)Overrides java. Implements java. |
| input | back to summary |
|---|---|
| private final Unmarshaller input | |
| MarshallerObjectInputStream | back to summary |
|---|---|
| protected MarshallerObjectInputStream(final Unmarshaller input) throws IOException, SecurityException Construct a new instance which delegates to the given unmarshaller.
| |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Implements org. Doc from org. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
| |
| close | back to summary |
|---|---|
| public final void close() throws IllegalStateException Overrides java. Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in | |
| defaultReadObject | back to summary |
|---|---|
| public abstract void defaultReadObject() throws IOException, ClassNotFoundException Overrides java. Doc from java. Read the non-static and non-transient fields of the current class from this stream. This may only be called from the readObject method of the class being deserialized. It will throw the NotActiveException if it is called otherwise.
| |
| enableResolveObject | back to summary |
|---|---|
| protected final boolean enableResolveObject(final boolean enable) throws IllegalStateException Overrides java. Doc from java. Enables the stream to do replacement of objects read from the stream. When
enabled, the If object replacement is currently not enabled, and
| |
| mark | back to summary |
|---|---|
| public final void mark(final int readlimit) Overrides java. Doc from java. Marks the current position in this input stream. A subsequent call to
the The The general contract of Marking a closed stream should not have any effect on the stream.
| |
| markSupported | back to summary |
|---|---|
| public final boolean markSupported() Overrides java. Doc from java. Tests if this input stream supports the
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Implements org. Doc from org. Reads the next byte of data from the input stream. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
| |
| read | back to summary |
|---|---|
| public int read(final byte[] buf) throws IOException Overrides java. Implements org. Doc from org. Read some bytes from the input stream into the given array. Returns the number of bytes actually read (possibly zero), or -1 if the end of stream has been reached.
| |
| read | back to summary |
|---|---|
| public int read(final byte[] buf, final int off, final int len) throws IOException Overrides java. Implements org. Doc from org. Read some bytes from the input stream into the given array. Returns the number of bytes actually read (possibly zero), or -1 if the end of stream has been reached.
| |
| readBoolean | back to summary |
|---|---|
| public boolean readBoolean() throws IOException Overrides java. Implements java. Doc from java. Reads in a boolean.
| |
| readByte | back to summary |
|---|---|
| public byte readByte() throws IOException Overrides java. Implements java. Doc from java. Reads an 8-bit byte.
| |
| readChar | back to summary |
|---|---|
| public char readChar() throws IOException Overrides java. Implements java. Doc from java. Reads a 16-bit char.
| |
| readClassDescriptor | back to summary |
|---|---|
| protected final ObjectStreamClass readClassDescriptor() throws IllegalStateException Overrides java. Doc from java. Read a class descriptor from the serialization stream. This method is
called when the ObjectInputStream expects a class descriptor as the next
item in the serialization stream. Subclasses of ObjectInputStream may
override this method to read in class descriptors that have been written
in non-standard formats (by subclasses of ObjectOutputStream which have
overridden the
| |
| readDouble | back to summary |
|---|---|
| public double readDouble() throws IOException Overrides java. Implements java. Doc from java. Reads a 64-bit double.
| |
| readFields | back to summary |
|---|---|
| public abstract ObjectInputStream. Overrides java. Doc from java. Reads the persistent fields from the stream and makes them available by name.
| |
| readFloat | back to summary |
|---|---|
| public float readFloat() throws IOException Overrides java. Implements java. Doc from java. Reads a 32-bit float.
| |
| readFully | back to summary |
|---|---|
| public void readFully(final byte[] buf) throws IOException Overrides java. Implements java. Doc from java. Reads bytes, blocking until all bytes are read.
| |
| readFully | back to summary |
|---|---|
| public void readFully(final byte[] buf, final int off, final int len) throws IOException Overrides java. Implements java. Doc from java. Reads bytes, blocking until all bytes are read.
| |
| readInt | back to summary |
|---|---|
| public int readInt() throws IOException Overrides java. Implements java. Doc from java. Reads a 32-bit int.
| |
| readLine | back to summary |
|---|---|
| public String readLine() throws IOException Overrides java. Implements java. Doc from java. Deprecated
Reads in a line that has been terminated by a \n, \r, \r\n or EOF.
| |
| readLong | back to summary |
|---|---|
| public long readLong() throws IOException Overrides java. Implements java. Doc from java. Reads a 64-bit long.
| |
| readObjectOverride | back to summary |
|---|---|
| protected Object readObjectOverride() throws IOException, ClassNotFoundException Overrides java. Doc from java. This method is called by trusted subclasses of ObjectInputStream that constructed ObjectInputStream using the protected no-arg constructor. The subclass is expected to provide an override method with the modifier "final".
| |
| readShort | back to summary |
|---|---|
| public short readShort() throws IOException Overrides java. Implements java. Doc from java. Reads a 16-bit short.
| |
| readStreamHeader | back to summary |
|---|---|
| protected final void readStreamHeader() throws IllegalStateException Overrides java. Doc from java. The readStreamHeader method is provided to allow subclasses to read and verify their own stream headers. It reads and verifies the magic number and version number. | |
| readUnshared | back to summary |
|---|---|
| public Object readUnshared() throws IOException, ClassNotFoundException Overrides java. Doc from java. Reads an "unshared" object from the ObjectInputStream. This method is identical to readObject, except that it prevents subsequent calls to readObject and readUnshared from returning additional references to the deserialized instance obtained via this call. Specifically:
The deserialization filter, when not ObjectInputStream subclasses which override this method can only be constructed in security contexts possessing the "enableSubclassImplementation" SerializablePermission; any attempt to instantiate such a subclass without this permission will cause a SecurityException to be thrown.
| |
| readUnsignedByte | back to summary |
|---|---|
| public int readUnsignedByte() throws IOException Overrides java. Implements java. Doc from java. Reads an unsigned 8-bit byte.
| |
| readUnsignedShort | back to summary |
|---|---|
| public int readUnsignedShort() throws IOException Overrides java. Implements java. Doc from java. Reads an unsigned 16-bit short.
| |
| readUTF | back to summary |
|---|---|
| public String readUTF() throws IOException Overrides java. Implements java. Doc from java. Reads a String in modified UTF-8 format.
| |
| registerValidation | back to summary |
|---|---|
| public abstract void registerValidation(final ObjectInputValidation obj, final int prio) throws NotActiveException, InvalidObjectException Overrides java. Doc from java. Register an object to be validated before the graph is returned. While similar to resolveObject these validations are called after the entire graph has been reconstituted. Typically, a readObject method will register the object with the stream so that when all of the objects are restored a final set of validations can be performed.
| |
| reset | back to summary |
|---|---|
| public final void reset() throws IOException Overrides java. Doc from java. Repositions this stream to the position at the time the
The general contract of
| |
| resolveClass | back to summary |
|---|---|
| protected final Class Overrides java. Doc from java. Load the local class equivalent of the specified stream class description. Subclasses may implement this method to allow classes to be fetched from an alternate source. The corresponding method in The default implementation of this method in
Class.forName(desc.getName(), false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader. If this call results in a
ClassNotFoundException and the name of the passed
ObjectStreamClass instance is the Java language keyword
for a primitive type or void, then the Class object
representing that primitive type or void will be returned
(e.g., an ObjectStreamClass with the name
"int" will be resolved to Integer.TYPE).
Otherwise, the ClassNotFoundException will be thrown to
the caller of this method.
| |
| resolveObject | back to summary |
|---|---|
| protected final Object resolveObject(final Object obj) throws IllegalStateException Overrides java. Doc from java. This method will allow trusted subclasses of ObjectInputStream to substitute one object for another during deserialization. Replacing objects is disabled until enableResolveObject is called. The enableResolveObject method checks that the stream requesting to resolve object can be trusted. Every reference to serializable objects is passed to resolveObject. To ensure that the private state of objects is not unintentionally exposed only trusted streams may use resolveObject. This method is called after an object has been read but before it is returned from readObject. The default resolveObject method just returns the same object. When a subclass is replacing objects it must ensure that the substituted object is compatible with every field where the reference will be stored. Objects whose type is not a subclass of the type of the field or array element abort the deserialization by raising an exception and the object is not be stored. This method is called only once when each object is first encountered. All subsequent references to the object will be redirected to the new object. | |
| resolveProxyClass | back to summary |
|---|---|
| protected final Class Overrides java. Doc from java. 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. This method is called exactly once for each unique proxy class descriptor in the stream. The corresponding method in The default implementation of this method in
Class.forName(i, false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader.
Unless any of the resolved interfaces are non-public, this same value
of loader is also the class loader passed to
Proxy.getProxyClass; if non-public interfaces are present,
their class loader is passed instead (if more than one non-public
interface class loader is encountered, an
IllegalAccessError is thrown).
If Proxy.getProxyClass throws an
IllegalArgumentException, resolveProxyClass
will throw a ClassNotFoundException containing the
IllegalArgumentException.
| |
| skip | back to summary |
|---|---|
| public long skip(final long n) throws IOException Overrides java. Implements org. Doc from org. Skips over and discards up to
| |
| skipBytes | back to summary |
|---|---|
| public int skipBytes(final int len) throws IOException Overrides java. Implements java. Doc from java. Skips bytes.
| |