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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.io.ObjectInputStream
ObjectInputStream.GetField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockUnmarshaller
private Object
private static final int
private static final int
private int
private SerializableClassDescriptor
private int
private final RiverUnmarshaller
private static final int
private static final int
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
ConstructorsModifierConstructorDescriptionprotected
RiverObjectInputStream
(RiverUnmarshaller riverUnmarshaller, BlockUnmarshaller delegateUnmarshaller) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
(package private) void
protected void
finish
(int restoreState) protected void
private int
getAndSet
(int set) protected int
protected void
int
read()
Reads the next byte of data from the input stream.int
read
(byte[] buf) Read some bytes from the input stream into the given array.int
read
(byte[] buf, int off, int len) Read some bytes from the input stream into the given array.boolean
byte
readByte()
char
readChar()
double
float
void
readFully
(byte[] buf) void
readFully
(byte[] buf, int off, int len) int
readInt()
readLine()
Deprecated.long
readLong()
protected Object
short
int
int
readUTF()
void
registerValidation
(ObjectInputValidation obj, int prio) long
skip
(long n) Skips over and discards up ton
bytes of data from this input stream.int
skipBytes
(int len) protected int
start()
protected SerializableClassDescriptor
swapClass
(SerializableClassDescriptor descriptor) protected Object
swapCurrent
(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, skipNBytes, transferTo
-
Field Details
-
OFF
private static final int OFF- See Also:
-
UNREAD_FIELDS
private static final int UNREAD_FIELDS- See Also:
-
UNREAD_FIELDS_EOB
private static final int UNREAD_FIELDS_EOB- See Also:
-
ON
private static final int ON- See Also:
-
unmarshaller
-
blockUnmarshaller
-
state
private int state -
serializableClassDescriptor
-
current
-
restoreIdx
private int restoreIdx
-
-
Constructor Details
-
RiverObjectInputStream
protected RiverObjectInputStream(RiverUnmarshaller riverUnmarshaller, BlockUnmarshaller delegateUnmarshaller) throws IOException, SecurityException - Throws:
IOException
SecurityException
-
-
Method Details
-
getAndSet
private int getAndSet(int set) -
defaultReadObject
Description copied from class:MarshallerObjectInputStream
- Specified by:
defaultReadObject
in classMarshallerObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
discardReadObject
- Throws:
IOException
-
readFields
Description copied from class:MarshallerObjectInputStream
- Specified by:
readFields
in classMarshallerObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
registerValidation
public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException Description copied from class:MarshallerObjectInputStream
- Specified by:
registerValidation
in classMarshallerObjectInputStream
- Throws:
NotActiveException
InvalidObjectException
-
swapClass
-
swapCurrent
-
start
protected int start() -
finish
- Throws:
IOException
-
checkState
- Throws:
IOException
-
readObjectOverride
Description copied from class:MarshallerObjectInputStream
- Overrides:
readObjectOverride
in classMarshallerObjectInputStream
- Throws:
IOException
ClassNotFoundException
-
read
Description copied from class:MarshallerObjectInputStream
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.- Specified by:
read
in interfaceByteInput
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classMarshallerObjectInputStream
- Returns:
- the next byte, or -1 if the end of stream has been reached
- Throws:
IOException
- if an error occurs
-
read
Description copied from class:MarshallerObjectInputStream
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.- Specified by:
read
in interfaceByteInput
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in 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
Description copied from class:MarshallerObjectInputStream
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.- Specified by:
read
in interfaceByteInput
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in 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
Description copied from class:MarshallerObjectInputStream
- Specified by:
readBoolean
in interfaceDataInput
- Overrides:
readBoolean
in classMarshallerObjectInputStream
- Throws:
IOException
-
readByte
Description copied from class:MarshallerObjectInputStream
- Specified by:
readByte
in interfaceDataInput
- Overrides:
readByte
in classMarshallerObjectInputStream
- Throws:
IOException
-
readUnsignedByte
Description copied from class:MarshallerObjectInputStream
- Specified by:
readUnsignedByte
in interfaceDataInput
- Overrides:
readUnsignedByte
in classMarshallerObjectInputStream
- Throws:
IOException
-
readChar
Description copied from class:MarshallerObjectInputStream
- Specified by:
readChar
in interfaceDataInput
- Overrides:
readChar
in classMarshallerObjectInputStream
- Throws:
IOException
-
readShort
Description copied from class:MarshallerObjectInputStream
- Specified by:
readShort
in interfaceDataInput
- Overrides:
readShort
in classMarshallerObjectInputStream
- Throws:
IOException
-
readUnsignedShort
Description copied from class:MarshallerObjectInputStream
- Specified by:
readUnsignedShort
in interfaceDataInput
- Overrides:
readUnsignedShort
in classMarshallerObjectInputStream
- Throws:
IOException
-
readInt
Description copied from class:MarshallerObjectInputStream
- Specified by:
readInt
in interfaceDataInput
- Overrides:
readInt
in classMarshallerObjectInputStream
- Throws:
IOException
-
readLong
Description copied from class:MarshallerObjectInputStream
- Specified by:
readLong
in interfaceDataInput
- Overrides:
readLong
in classMarshallerObjectInputStream
- Throws:
IOException
-
readFloat
Description copied from class:MarshallerObjectInputStream
- Specified by:
readFloat
in interfaceDataInput
- Overrides:
readFloat
in classMarshallerObjectInputStream
- Throws:
IOException
-
readDouble
Description copied from class:MarshallerObjectInputStream
- Specified by:
readDouble
in interfaceDataInput
- Overrides:
readDouble
in classMarshallerObjectInputStream
- Throws:
IOException
-
readFully
Description copied from class:MarshallerObjectInputStream
- Specified by:
readFully
in interfaceDataInput
- Overrides:
readFully
in classMarshallerObjectInputStream
- Throws:
IOException
-
readFully
Description copied from class:MarshallerObjectInputStream
- Specified by:
readFully
in interfaceDataInput
- Overrides:
readFully
in classMarshallerObjectInputStream
- Throws:
IOException
-
skipBytes
Description copied from class:MarshallerObjectInputStream
- Specified by:
skipBytes
in interfaceDataInput
- Overrides:
skipBytes
in classMarshallerObjectInputStream
- Throws:
IOException
-
readLine
Deprecated.Description copied from class:MarshallerObjectInputStream
- Specified by:
readLine
in interfaceDataInput
- Overrides:
readLine
in classMarshallerObjectInputStream
- Throws:
IOException
-
readUTF
Description copied from class:MarshallerObjectInputStream
- Specified by:
readUTF
in interfaceDataInput
- Overrides:
readUTF
in classMarshallerObjectInputStream
- Throws:
IOException
-
skip
Description copied from class:MarshallerObjectInputStream
Skips over and discards up ton
bytes of data from this input stream. If the end of stream is reached, this method returns0
in order to be consistent withInputStream.skip(long)
.- Specified by:
skip
in interfaceByteInput
- Specified by:
skip
in interfaceObjectInput
- Overrides:
skip
in 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()
-