|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.mapping.FudgeObjectReader
public class FudgeObjectReader
Deserialises Java objects from an underlying stream of Fudge messages.
Constructor Summary | |
---|---|
FudgeObjectReader(FudgeMsgReader messageReader)
Creates a new FudgeObjectReader around the underlying FudgeMsgReader stream. |
Method Summary | ||
---|---|---|
void |
close()
Closes the underlying stream. |
|
FudgeDeserializationContext |
getDeserialisationContext()
Returns the current FudgeDeserializationContext . |
|
FudgeContext |
getFudgeContext()
Returns the underlying FudgeContext . |
|
FudgeMsgReader |
getMessageReader()
Returns the underlying message source. |
|
boolean |
hasNext()
Returns true if the underlying message source has another message and read() or read(Class) can be
called. |
|
Object |
read()
Reads the next message from the underlying source and deserializes it to a Java object. |
|
|
read(Class<T> clazz)
Reads the next message from the underlying source and deserializes it to the requested Java type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FudgeObjectReader(FudgeMsgReader messageReader)
FudgeObjectReader
around the underlying FudgeMsgReader
stream.
messageReader
- the source of Fudge messages containing serialised objectsMethod Detail |
---|
public void close()
public FudgeContext getFudgeContext()
FudgeContext
. This will be the context of the FudgeMsgReader
being used.
FudgeContext
public FudgeDeserializationContext getDeserialisationContext()
FudgeDeserializationContext
. This is associated with the same FudgeContext
as
the source message stream.
FudgeDeserialisationContext
public FudgeMsgReader getMessageReader()
FudgeMsgReader
public boolean hasNext()
true
if the underlying message source has another message and read()
or read(Class)
can be
called.
true
if there are more messages to be deserialized, false
otherwisepublic Object read()
public <T> T read(Class<T> clazz)
T
- Java type of the requested objectclazz
- Java class of the requested object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |