Top Description Methods
org.jboss.marshalling

public Interface Unmarshaller

extends ObjectInput, ByteInput
Known Direct Implementers
org.jboss.marshalling.cloner.SerializingCloner.StepObjectInput, org.jboss.marshalling.AbstractUnmarshaller, org.jboss.marshalling.ObjectInputStreamUnmarshaller
Imports
java.io.InvalidObjectException, .ObjectInput, .IOException

An unmarshaller which reads objects from a stream.

Method Summary

Modifier and TypeMethod and Description
public void
clearClassCache()

Discard the class cache.

public void
clearInstanceCache()

Discard the instance cache.

public void
finish()

Finish unmarshalling from a stream.

public <
the object type
T
>
T

Returns:

the object read from the stream
readObject
(Class<T>
the object class
type
)

Read and return an object, cast to a specific type.

public Object

Returns:

an unshared object
readObjectUnshared
()

Read and return an unshared object.

public <
the object type
T
>
T

Returns:

an unshared object
readObjectUnshared
(Class<T>
the object class
type
)

Read and return an unshared object, cast to a specific type.

public void
start(ByteInput
the new stream
newInput
)

Begin unmarshalling from a stream.

Inherited from java.io.ObjectInput:
availableclosereadreadreadreadObjectskip
Inherited from org.jboss.marshalling.ByteInput:
availablereadreadreadskip

Method Detail

clearClassCacheback to summary
public void clearClassCache() throws IOException

Discard the class cache. Implicitly also discards the instance cache.

Exceptions
IOException:
if an error occurs
clearInstanceCacheback to summary
public void clearInstanceCache() throws IOException

Discard the instance cache.

Exceptions
IOException:
if an error occurs
finishback to summary
public void finish() throws IOException

Finish unmarshalling from a stream. Any transient class or instance cache is discarded.

Exceptions
IOException:
if an error occurs
readObjectback to summary
public <T> T readObject(Class<T> type) throws ClassNotFoundException, IOException

Read and return an object, cast to a specific type.

Parameters
<T>
the object type
type:Class<T>

the object class

Returns:T

the object read from the stream

Exceptions
ClassNotFoundException:
if the class of a serialized object cannot be found
IOException:
if an error occurs
InvalidObjectException:
if the object is not of the expected type
readObjectUnsharedback to summary
public Object readObjectUnshared() throws ClassNotFoundException, IOException

Read and return an unshared object.

Returns:Object

an unshared object

Exceptions
ClassNotFoundException:
if the class of a serialized object cannot be found
IOException:
if an error occurs
readObjectUnsharedback to summary
public <T> T readObjectUnshared(Class<T> type) throws ClassNotFoundException, IOException

Read and return an unshared object, cast to a specific type.

Parameters
<T>
the object type
type:Class<T>

the object class

Returns:T

an unshared object

Exceptions
ClassNotFoundException:
if the class of a serialized object cannot be found
IOException:
if an error occurs
InvalidObjectException:
if the object is not of the expected type
startback to summary
public void start(ByteInput newInput) throws IOException

Begin unmarshalling from a stream.

Parameters
newInput:ByteInput

the new stream

Exceptions
IOException:
if an error occurs during setup, such as an invalid header