|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.japisoft.fastparser.Parser
Main Parser class
NodeFactory
,
DocumentBuilder
Field Summary | |
int |
ERROR_STATE
|
int |
STATE_COUNT
|
int |
STATE_INIT
|
Constructor Summary | |
Parser()
|
Method Summary | |
void |
bufferingMode(boolean buffering)
if true it will bufferize the input stream before parsing. it costs ressource for low memory
device and very fast input stream. |
protected java.io.InputStream |
createBuffer(java.io.InputStream input)
Store in memory the current input stream, this is called after the setInputStream method |
protected void |
fireItemFound(int state,
java.lang.String item)
|
Document |
getDocument()
|
DocumentBuilder |
getDocumentBuilder()
|
NodeFactory |
getNodeFactory()
|
boolean |
hasBufferingMode()
|
boolean |
isMandatoryProlog()
|
boolean |
isPreserveWhiteSpace()
Deprecated. |
static void |
main(java.lang.String[] args)
|
void |
parse()
Parse the current document |
void |
preserveComment(boolean comment)
Save XML comment |
void |
preserveWhiteSpace(boolean ws)
Deprecated. |
protected java.io.InputStream |
readerToInputStream(java.io.Reader r)
Convertissor from Reader to InputStream |
void |
setDocumentBuilder(DocumentBuilder db)
Reset the builder for the document |
void |
setInputStream(java.io.InputStream input)
Set the input stream of the document to parse. |
void |
setMandatoryProlog(boolean prolog)
Set the prolog mandatory, but default to true |
void |
setNodeFactory(NodeFactory nf)
Update the factory for building node |
void |
setText(java.lang.String text)
Reset the document to parsed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final int ERROR_STATE
public final int STATE_COUNT
public final int STATE_INIT
Constructor Detail |
public Parser()
Method Detail |
public void setNodeFactory(NodeFactory nf)
public NodeFactory getNodeFactory()
public void setDocumentBuilder(DocumentBuilder db)
public DocumentBuilder getDocumentBuilder()
public Document getDocument()
public void preserveComment(boolean comment)
public void setInputStream(java.io.InputStream input)
public void bufferingMode(boolean buffering)
true
it will bufferize the input stream before parsing. it costs ressource for low memory
device and very fast input stream. By default to true
public boolean hasBufferingMode()
public void setText(java.lang.String text)
public void setMandatoryProlog(boolean prolog)
true
public boolean isMandatoryProlog()
true
is the XML prolog is mandatorypublic void preserveWhiteSpace(boolean ws)
false
public boolean isPreserveWhiteSpace()
false
public void parse() throws ParseException
ParseException
protected void fireItemFound(int state, java.lang.String item) throws ParseException
ParseException
protected java.io.InputStream readerToInputStream(java.io.Reader r) throws java.io.IOException
java.io.IOException
protected java.io.InputStream createBuffer(java.io.InputStream input) throws java.io.IOException
setInputStream
method
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |