Package org.jboss.marshalling.river
Class RiverUnmarshaller
-
- All Implemented Interfaces:
Closeable
,DataInput
,ObjectInput
,AutoCloseable
,ByteInput
,Unmarshaller
public class RiverUnmarshaller extends AbstractUnmarshaller
-
-
Field Summary
-
Fields inherited from class org.jboss.marshalling.AbstractUnmarshaller
classExternalizerFactory, classResolver, classTable, configuredVersion, exceptionListener, objectPreResolver, objectResolver, objectTable, serializabilityChecker, streamHeader
-
Fields inherited from class org.jboss.marshalling.SimpleDataInput
buffer, limit, position
-
Fields inherited from class org.jboss.marshalling.ByteInputStream
byteInput
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RiverUnmarshaller(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearClassCache()
Discard the class cache.void
clearInstanceCache()
Discard the instance cache.void
close()
protected void
discardFields(SerializableClassDescriptor descriptor)
protected Object
doReadNewObject(int streamClassType, boolean unshared, boolean discardMissing)
protected Object
doReadObject(boolean unshared)
Implementation of the actual object-reading method.void
finish()
Finish reading from the current input.protected void
readFields(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing)
protected String
readString()
String
readUTF()
void
start(ByteInput byteInput)
Start reading from the given input.-
Methods inherited from class org.jboss.marshalling.AbstractObjectInput
readObject, readObject, readObjectUnshared, readObjectUnshared
-
Methods inherited from class org.jboss.marshalling.SimpleDataInput
available, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readIntDirect, readLine, readLong, readLongDirect, readShort, readUnsignedByte, readUnsignedByteDirect, readUnsignedShort, skip, skipBytes
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, skipBytes
-
Methods inherited from interface java.io.ObjectInput
available, read, read, read, readObject, skip
-
Methods inherited from interface org.jboss.marshalling.Unmarshaller
readObject, readObjectUnshared, readObjectUnshared
-
-
-
-
Constructor Detail
-
RiverUnmarshaller
protected RiverUnmarshaller(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration)
-
-
Method Detail
-
clearInstanceCache
public void clearInstanceCache() throws IOException
Description copied from interface:Unmarshaller
Discard the instance cache.- Throws:
IOException
- if an error occurs
-
clearClassCache
public void clearClassCache() throws IOException
Description copied from interface:Unmarshaller
Discard the class cache. Implicitly also discards the instance cache.- Throws:
IOException
- if an error occurs
-
close
public void close() throws IOException
Description copied from class:SimpleDataInput
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectInput
- Overrides:
close
in classSimpleDataInput
- Throws:
IOException
-
finish
public void finish() throws IOException
Description copied from class:AbstractUnmarshaller
Finish reading from the current input. The internal buffer is discarded, not flushed.- Specified by:
finish
in interfaceUnmarshaller
- Overrides:
finish
in classAbstractUnmarshaller
- Throws:
IOException
- not thrown by this implementation, but may be overridden to be thrown if a problem occurs
-
doReadObject
protected Object doReadObject(boolean unshared) throws ClassNotFoundException, IOException
Description copied from class:AbstractObjectInput
Implementation of the actual object-reading method.- Specified by:
doReadObject
in classAbstractObjectInput
- Parameters:
unshared
-true
if the instance should be unshared,false
if it is shared- Returns:
- the object to read
- Throws:
ClassNotFoundException
- if the class for the object could not be loadedIOException
- if an I/O error occurs
-
readString
protected String readString() throws IOException
- Throws:
IOException
-
start
public void start(ByteInput byteInput) throws IOException
Description copied from class:AbstractUnmarshaller
Start reading from the given input. The internal buffer is discarded.- Specified by:
start
in interfaceUnmarshaller
- Overrides:
start
in classAbstractUnmarshaller
- Parameters:
byteInput
- the new input from which to read- Throws:
IOException
- not thrown by this implementation, but may be overridden to be thrown if a problem occurs
-
doReadNewObject
protected Object doReadNewObject(int streamClassType, boolean unshared, boolean discardMissing) throws ClassNotFoundException, IOException
- Throws:
ClassNotFoundException
IOException
-
readFields
protected void readFields(Object obj, SerializableClassDescriptor descriptor, boolean discardMissing) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
discardFields
protected void discardFields(SerializableClassDescriptor descriptor) throws IOException
- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
Description copied from class:SimpleDataInput
- Specified by:
readUTF
in interfaceDataInput
- Overrides:
readUTF
in classSimpleDataInput
- Throws:
IOException
-
-