|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FudgeStreamReader
Abstract interface for reading Fudge elements from a source. This base can be used to build full Fudge message parsers or deserialisers to construct Java objects directly from Fudge streams.
Nested Class Summary | |
---|---|
static class |
FudgeStreamReader.FudgeStreamElement
Constants for the four stream element types as returned by next() and getCurrentElement() . |
Method Summary | |
---|---|
void |
close()
Closes the FudgeStreamReader and attempts to close the underlying data source if appropriate. |
FudgeStreamReader.FudgeStreamElement |
getCurrentElement()
Returns the value last returned by next() . |
String |
getFieldName()
If the current stream element is a field, returns the field name. |
Integer |
getFieldOrdinal()
If the current stream element is a field, returns the ordinal index, or null if the field did not include an ordinal. |
FudgeFieldType<?> |
getFieldType()
If the current stream element is a field, returns the FudgeFieldType . |
Object |
getFieldValue()
If the current stream element is a field, returns the field value. |
FudgeContext |
getFudgeContext()
Returns the FudgeContext bound to the reader used for type and taxonomy resolution. |
int |
getProcessingDirectives()
Returns the processing directivies specified in the last envelope header read. |
int |
getSchemaVersion()
Returns the schema version specified in the last envelope header read. |
FudgeTaxonomy |
getTaxonomy()
Returns the current FudgeTaxonomy corresponding to the taxonomy identifier specified in the message envelope. |
short |
getTaxonomyId()
Returns the taxonomy identifier specified in the last envelope header read. |
boolean |
hasNext()
Returns true if there is at least one more element to be returned by a call to next() . |
FudgeStreamReader.FudgeStreamElement |
next()
Reads the next stream element from the source and returns the element type. |
Method Detail |
---|
boolean hasNext()
Returns true if there is at least one more element to be returned by a call to next()
. A return of false
indicates the end of a message (or submessage) has been reached. After the end of a sub-message, the next immediate call will
indicate whether there are further elements or the end of the outer message. After the end of the main message referenced by
the envelope header, the next immediate call may:
false
if the source does not contain any subsequent Fudge messages; ortrue
if the source may contain further Fudge messages. Calling next()
will return the envelope header
of the next message if one is present, or null
if the source does not contain any further messages.
true
if there is at least one more element to readFudgeStreamReader.FudgeStreamElement next()
null
if the end of stream has been reached at a message
boundary (i.e. attempting to read the first byte of an envelope)FudgeStreamReader.FudgeStreamElement getCurrentElement()
next()
.
Object getFieldValue()
int getProcessingDirectives()
int getSchemaVersion()
short getTaxonomyId()
FudgeFieldType<?> getFieldType()
FudgeFieldType
.
Integer getFieldOrdinal()
null
if the field did not include an ordinal.
String getFieldName()
FudgeTaxonomy getTaxonomy()
FudgeTaxonomy
corresponding to the taxonomy identifier specified in the message envelope. Returns
null
if the message did not specify a taxonomy or the taxonomy identifier cannot be resolved by the bound FudgeContext
.
FudgeContext getFudgeContext()
FudgeContext
bound to the reader used for type and taxonomy resolution.
FudgeContext
void close()
FudgeStreamReader
and attempts to close the underlying data source if appropriate.
close
in interface Closeable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |