Package org.jboss.marshalling.river
Class RiverObjectInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.ObjectInputStream
-
- org.jboss.marshalling.MarshallerObjectInputStream
-
- org.jboss.marshalling.river.RiverObjectInputStream
-
- All Implemented Interfaces:
Closeable,DataInput,ObjectInput,ObjectStreamConstants,AutoCloseable,ByteInput
public class RiverObjectInputStream extends MarshallerObjectInputStream
-
-
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 Modifier Constructor Description protectedRiverObjectInputStream(RiverUnmarshaller riverUnmarshaller, BlockUnmarshaller delegateUnmarshaller)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddefaultReadObject()protected voidfinish(int restoreState)protected voidfullReset()protected intgetRestoreIdx()protected voidnoCustomData()intread()Reads the next byte of data from the input stream.intread(byte[] buf)Read some bytes from the input stream into the given array.intread(byte[] buf, int off, int len)Read some bytes from the input stream into the given array.booleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()ObjectInputStream.GetFieldreadFields()floatreadFloat()voidreadFully(byte[] buf)voidreadFully(byte[] buf, int off, int len)intreadInt()StringreadLine()Deprecated.longreadLong()protected ObjectreadObjectOverride()shortreadShort()ObjectreadUnshared()intreadUnsignedByte()intreadUnsignedShort()StringreadUTF()voidregisterValidation(ObjectInputValidation obj, int prio)longskip(long n)Skips over and discards up tonbytes of data from this input stream.intskipBytes(int len)protected intstart()protected SerializableClassDescriptorswapClass(SerializableClassDescriptor descriptor)protected ObjectswapCurrent(Object obj)-
Methods inherited from class org.jboss.marshalling.MarshallerObjectInputStream
available, close, enableResolveObject, mark, markSupported, readClassDescriptor, readStreamHeader, reset, resolveClass, resolveObject, resolveProxyClass
-
Methods inherited from class java.io.ObjectInputStream
getObjectInputFilter, readObject, setObjectInputFilter
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
RiverObjectInputStream
protected RiverObjectInputStream(RiverUnmarshaller riverUnmarshaller, BlockUnmarshaller delegateUnmarshaller) throws IOException, SecurityException
- Throws:
IOExceptionSecurityException
-
-
Method Detail
-
defaultReadObject
public void defaultReadObject() throws IOException, ClassNotFoundExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
defaultReadObjectin classMarshallerObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
readFields
public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException
Description copied from class:MarshallerObjectInputStream- Specified by:
readFieldsin classMarshallerObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
registerValidation
public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException
Description copied from class:MarshallerObjectInputStream- Specified by:
registerValidationin classMarshallerObjectInputStream- Throws:
NotActiveExceptionInvalidObjectException
-
swapClass
protected SerializableClassDescriptor swapClass(SerializableClassDescriptor descriptor)
-
start
protected int start()
-
finish
protected void finish(int restoreState) throws IOException- Throws:
IOException
-
readObjectOverride
protected Object readObjectOverride() throws IOException, ClassNotFoundException
Description copied from class:MarshallerObjectInputStream- Overrides:
readObjectOverridein classMarshallerObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
readUnshared
public Object readUnshared() throws IOException, ClassNotFoundException
Description copied from class:MarshallerObjectInputStream- Overrides:
readUnsharedin classMarshallerObjectInputStream- Throws:
IOExceptionClassNotFoundException
-
read
public int read() throws IOExceptionDescription copied from class:MarshallerObjectInputStreamReads 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.- Specified by:
readin interfaceByteInput- Specified by:
readin interfaceObjectInput- Overrides:
readin classMarshallerObjectInputStream- Returns:
- the next byte, or -1 if the end of stream has been reached
- Throws:
IOException- if an error occurs
-
read
public int read(byte[] buf) throws IOExceptionDescription copied from class:MarshallerObjectInputStreamRead 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.- Specified by:
readin interfaceByteInput- Specified by:
readin interfaceObjectInput- Overrides:
readin classMarshallerObjectInputStream- Parameters:
buf- the destination array- Returns:
- the number of bytes read (possibly zero), or -1 if the end of stream has been reached
- Throws:
IOException- if an error occurs
-
read
public int read(byte[] buf, int off, int len) throws IOExceptionDescription copied from class:MarshallerObjectInputStreamRead 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.- Specified by:
readin interfaceByteInput- Specified by:
readin interfaceObjectInput- Overrides:
readin classMarshallerObjectInputStream- Parameters:
buf- the destination arrayoff- the offset into the array into which data should be readlen- the number of bytes to attempt to fill in the destination array- Returns:
- the number of bytes read (possibly zero), or -1 if the end of stream has been reached
- Throws:
IOException- if an error occurs
-
readBoolean
public boolean readBoolean() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readBooleanin interfaceDataInput- Overrides:
readBooleanin classMarshallerObjectInputStream- Throws:
IOException
-
readByte
public byte readByte() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readBytein interfaceDataInput- Overrides:
readBytein classMarshallerObjectInputStream- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readUnsignedBytein interfaceDataInput- Overrides:
readUnsignedBytein classMarshallerObjectInputStream- Throws:
IOException
-
readChar
public char readChar() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readCharin interfaceDataInput- Overrides:
readCharin classMarshallerObjectInputStream- Throws:
IOException
-
readShort
public short readShort() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readShortin interfaceDataInput- Overrides:
readShortin classMarshallerObjectInputStream- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readUnsignedShortin interfaceDataInput- Overrides:
readUnsignedShortin classMarshallerObjectInputStream- Throws:
IOException
-
readInt
public int readInt() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readIntin interfaceDataInput- Overrides:
readIntin classMarshallerObjectInputStream- Throws:
IOException
-
readLong
public long readLong() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readLongin interfaceDataInput- Overrides:
readLongin classMarshallerObjectInputStream- Throws:
IOException
-
readFloat
public float readFloat() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readFloatin interfaceDataInput- Overrides:
readFloatin classMarshallerObjectInputStream- Throws:
IOException
-
readDouble
public double readDouble() throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readDoublein interfaceDataInput- Overrides:
readDoublein classMarshallerObjectInputStream- Throws:
IOException
-
readFully
public void readFully(byte[] buf) throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classMarshallerObjectInputStream- Throws:
IOException
-
readFully
public void readFully(byte[] buf, int off, int len) throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
readFullyin interfaceDataInput- Overrides:
readFullyin classMarshallerObjectInputStream- Throws:
IOException
-
skipBytes
public int skipBytes(int len) throws IOExceptionDescription copied from class:MarshallerObjectInputStream- Specified by:
skipBytesin interfaceDataInput- Overrides:
skipBytesin classMarshallerObjectInputStream- Throws:
IOException
-
readLine
@Deprecated public String readLine() throws IOException
Deprecated.Description copied from class:MarshallerObjectInputStream- Specified by:
readLinein interfaceDataInput- Overrides:
readLinein classMarshallerObjectInputStream- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
Description copied from class:MarshallerObjectInputStream- Specified by:
readUTFin interfaceDataInput- Overrides:
readUTFin classMarshallerObjectInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOExceptionDescription copied from class:MarshallerObjectInputStreamSkips over and discards up tonbytes of data from this input stream. If the end of stream is reached, this method returns0in order to be consistent withInputStream.skip(long).- Specified by:
skipin interfaceByteInput- Specified by:
skipin interfaceObjectInput- Overrides:
skipin classMarshallerObjectInputStream- Parameters:
n- the number of bytes to attempt to skip- Returns:
- the number of bytes skipped
- Throws:
IOException- if an error occurs
-
fullReset
protected void fullReset()
-
noCustomData
protected void noCustomData()
-
getRestoreIdx
protected int getRestoreIdx()
-
-