|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ofx4j.io.BaseOFXReader
public abstract class BaseOFXReader
Base class for an OFX reader. Parses the headers and determines whether we're parsing an OFX v2 or OFX v1 element. For OFX v2, uses a standard SAX library.
Field Summary | |
---|---|
static java.util.regex.Pattern |
OFX_2_PROCESSING_INSTRUCTION_PATTERN
|
Constructor Summary | |
---|---|
BaseOFXReader()
|
Method Summary | |
---|---|
OFXHandler |
getContentHandler()
The content handler. |
protected char[] |
getFirstElementStart()
The first characters of the first OFX element, '<', 'O', 'F', 'X' |
void |
parse(java.io.InputStream stream)
Parses the stream as UTF-8 encoded data. |
void |
parse(java.io.Reader reader)
Parse the reader, including the headers. |
protected abstract void |
parseV1FromFirstElement(java.io.Reader reader)
Parse an OFX version 1 stream from the first OFX element (defined by the first element characters ). |
protected void |
parseV2FromFirstElement(java.io.Reader reader)
Parse an OFX version 2 stream from the first OFX element (defined by the first element characters ). |
protected void |
processOFXv1Headers(java.lang.String chars)
Process the given characters as OFX version 1 headers. |
protected void |
processOFXv2Headers(java.lang.String chars)
Process the given characters as OFX version 2 headers. |
void |
setContentHandler(OFXHandler handler)
The content handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern OFX_2_PROCESSING_INSTRUCTION_PATTERN
Constructor Detail |
---|
public BaseOFXReader()
Method Detail |
---|
public OFXHandler getContentHandler()
public void setContentHandler(OFXHandler handler)
setContentHandler
in interface OFXReader
handler
- The content handler.public void parse(java.io.InputStream stream) throws java.io.IOException, OFXParseException
parse
in interface OFXReader
stream
- The stream to parse.
java.io.IOException
OFXParseException
public void parse(java.io.Reader reader) throws java.io.IOException, OFXParseException
parse
in interface OFXReader
reader
- The reader.
java.io.IOException
OFXParseException
protected char[] getFirstElementStart()
protected abstract void parseV1FromFirstElement(java.io.Reader reader) throws java.io.IOException, OFXParseException
first element characters
).
reader
- The reader.
java.io.IOException
OFXParseException
protected void parseV2FromFirstElement(java.io.Reader reader) throws java.io.IOException, OFXParseException
first element characters
).
reader
- The reader.
java.io.IOException
OFXParseException
protected void processOFXv1Headers(java.lang.String chars) throws java.io.IOException, OFXParseException
chars
- The characters to process.
java.io.IOException
OFXParseException
protected void processOFXv2Headers(java.lang.String chars) throws OFXParseException
chars
- The characters to process.
OFXParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |