|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.presentation.Source
biz.c24.io.api.presentation.FIXSource
public class FIXSource
Note that this implementation is not synchronized. If multiple threads use an instance concurrently, it must be synchronized externally. Created by IntelliJ IDEA. User: divanmostert Date: 15/06/2011 Time: 17:22 To change this template use File | Settings | File Templates.
Constructor Summary | |
---|---|
FIXSource()
Constructs a new instance. |
|
FIXSource(FIXSource clone)
Constructs a new instance cloned from clone . |
|
FIXSource(InputStream stream)
Constructs a new instance which will read from stream . |
|
FIXSource(Reader reader)
Constructs a new instance which will read from reader . |
Method Summary | |
---|---|
Object |
clone()
|
int |
getLookAhead()
Returns the maximum number of characters to look ahead. |
int |
getLookBehind()
Returns the maximum number of characters to look behind. |
InputStream |
getMarkableInputStream()
|
boolean |
isAllowFieldsOutOfOrder()
Returns whether fields are in the correct order. |
boolean |
isAllowNoData()
Returns whether fields with no data are allowed. |
boolean |
isEndOfDataRequired()
Returns whether the stream / reader must be emptied for the read to succeed. |
boolean |
isIgnoreRepeatingGroupOrder()
Returns whether repeating group data order should be checked |
boolean |
isIgnoreUnknownFields()
Returns whether fields not defined in the model should be ignored |
void |
readObject(ComplexDataObject context)
Reads an object from the the reader or input stream that has been set (optional operation). |
ComplexDataObject |
readObject(Element element)
Reads an object from the the reader or input stream that has been set. |
boolean |
ready()
Tests whether the underlying stream or reader contains more data waiting to be parsed. |
void |
setAllowFieldsOutOfOrder(boolean allowFieldsOutOfOrder)
Sets whether field order should be validated. |
void |
setAllowNoData(boolean allowNoData)
Sets whether to check that all fields have data associated with them. |
void |
setEndOfDataRequired(boolean endOfDataRequired)
Sets whether the stream / reader must be emptied for the read to succeed. |
void |
setIgnoreRepeatingGroupOrder(boolean ignoreRepeatingGroupOrder)
Sets whether repeating group order should be validated |
void |
setIgnoreUnknownFields(boolean ignoreUnknownFields)
Sets whether fields not defined in the model should be ignored |
void |
setInputStream(InputStream stream,
URI systemId)
Sets the input stream and system ID (optional operation). |
void |
setLookAhead(int lookAhead)
Sets the maximum number of characters to look ahead. |
void |
setLookBehind(int lookBehind)
Sets the maximum number of characters to look behind. |
void |
setReader(Reader reader,
URI systemId)
Sets the reader (optional operation). |
Methods inherited from class biz.c24.io.api.presentation.Source |
---|
checkInit, getEncoding, getInputStream, getParseListener, getReader, getSystemId, reader, setEncoding, setInputStream, setParseListener, setReader, setSystemId, stream |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FIXSource()
public FIXSource(FIXSource clone)
clone
.
clone
- The instance to clone.public FIXSource(Reader reader)
reader
.
reader
- The reader to read the data from.public FIXSource(InputStream stream)
stream
.
stream
- The stream to read the data from.Method Detail |
---|
public boolean ready()
Source
Reader.ready()
and InputStream.available()
since it may need to take into account data which has been buffered by the Source implementation.
ready
in class Source
public int getLookAhead()
public void setLookAhead(int lookAhead)
lookAhead
- The new look ahead value.public int getLookBehind()
public void setLookBehind(int lookBehind)
lookBehind
- The new look behind value.public boolean isEndOfDataRequired()
public void setEndOfDataRequired(boolean endOfDataRequired)
false
if the readObject method is to be called more
than once on the same stream / reader or if the calling code is not concerned about additional data such as blank
lines. Set this parameter to true
(the default) if you are expecting the stream / reader to contain one and only
one data instance.
endOfDataRequired
- Whether an end of data marker is required in the stream / reader.public boolean isAllowFieldsOutOfOrder()
public void setAllowFieldsOutOfOrder(boolean allowFieldsOutOfOrder)
allowFieldsOutOfOrder
- Whether to check field orderpublic boolean isAllowNoData()
public void setAllowNoData(boolean allowNoData)
allowNoData
- Whether to validate that all fields have datapublic boolean isIgnoreRepeatingGroupOrder()
public void setIgnoreRepeatingGroupOrder(boolean ignoreRepeatingGroupOrder)
ignoreRepeatingGroupOrder
- Whether repeating group order should be validated.public boolean isIgnoreUnknownFields()
public void setIgnoreUnknownFields(boolean ignoreUnknownFields)
ignoreUnknownFields
- Whether to ignore or notpublic void setReader(Reader reader, URI systemId)
Source
setReader
in class Source
reader
- The new value.systemId
- The system ID identifying the reader.public void setInputStream(InputStream stream, URI systemId)
Source
setInputStream
in class Source
stream
- The new value.systemId
- The system ID identifying the stream.public ComplexDataObject readObject(Element element) throws IOException
Source
readObject
in class Source
element
- The element declaration to which the input data is expected to adhere.
IOException
- If the complete object could not be read for any reason.public void readObject(ComplexDataObject context) throws IOException
Source
readObject
in class Source
context
- The object into which the input data should be parsed.
IOException
- If the complete object could not be read for any reason.public InputStream getMarkableInputStream()
getMarkableInputStream
in class Source
public Object clone()
clone
in class Source
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |