|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.FudgeMsgReader
public class FudgeMsgReader
A reader for returning whole Fudge messages (FudgeFieldContainer
instances) from an underlying FudgeStreamReader
instance.
This implementation constructs the whole Fudge message in memory before returning to the caller. This is provided for convenience - greater
runtime efficiency may be possible by working directly with the FudgeStreamReader
to process stream elements as they are decoded.
Constructor Summary | |
---|---|
FudgeMsgReader(FudgeStreamReader streamReader)
Creates a new FudgeMsgReader around an existing FudgeStreamReader . |
Method Summary | |
---|---|
void |
close()
Closes this FudgeMsgReader and the underlying FudgeStreamReader . |
FudgeContext |
getFudgeContext()
Returns the FudgeContext associated with the underlying source. |
protected FudgeStreamReader |
getStreamReader()
Returns the underlying FudgeStreamReader for this message reader. |
boolean |
hasNext()
Returns true if there are more messages to read from the underlying source. |
FudgeFieldContainer |
nextMessage()
Reads the next message, discarding the envelope. |
FudgeMsgEnvelope |
nextMessageEnvelope()
Reads the next message, returning the envelope. |
protected void |
processFields(MutableFudgeFieldContainer msg)
Processes all of the fields from the current message (or sub-message) in the stream, adding them to the supplied container. |
protected FudgeMsgEnvelope |
readMessageEnvelope()
Reads the next message envelope from the underlying stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FudgeMsgReader(FudgeStreamReader streamReader)
FudgeMsgReader
around an existing FudgeStreamReader
.
streamReader
- the source of Fudge stream elements to readMethod Detail |
---|
public void close()
FudgeMsgReader
and the underlying FudgeStreamReader
.
public FudgeContext getFudgeContext()
FudgeContext
associated with the underlying source.
FudgeContext
protected FudgeStreamReader getStreamReader()
FudgeStreamReader
for this message reader.
FudgeStreamReader
public boolean hasNext()
true
if nextMessage()
or nextMessageEnvelope()
will return datapublic FudgeFieldContainer nextMessage()
public FudgeMsgEnvelope nextMessageEnvelope()
FudgeMsgEnvelope
protected FudgeMsgEnvelope readMessageEnvelope()
FudgeMsgEnvelope
readprotected void processFields(MutableFudgeFieldContainer msg)
msg
- container to add fields read to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |