H - the type of handler to which this parser sends eventspublic abstract class StringParser<H extends Handler> extends Parser<H>
StringParser is an abstract parser based on an
abstract method for parsing from a character slice. All parsing
methods will eventually call Parser.parseString(char[],int,int).
Input sources are converted to character sequences using
Streams.toCharArray(InputSource).
| Modifier | Constructor and Description |
|---|---|
protected |
StringParser()
Construct a string parser with no handler specified.
|
protected |
StringParser(H handler)
Construct a string parser with the specified handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
parse(InputSource in)
Parse the specified input source.
|
getHandler, parse, parse, parse, parse, parseString, parseString, setHandlerprotected StringParser()
protected StringParser(H handler)
handler - Handler for input events.public void parse(InputSource in) throws IOException
The implementation here converts the input source to a
character slice using Streams.toCharArray(InputSource)
and passes the result to Parser.parseString(char[],int,int).
parse in class Parser<H extends Handler>in - Input source from which to read.IOException - If there is an I/O error reading from the
input source.Copyright © 2016 Alias-i, Inc.. All rights reserved.