|
GXPARSE hosted by | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.gorman.util.scan.spi.AbstractScanner
public abstract class AbstractScanner
A Scanner
factory.
Constructor Summary | |
---|---|
protected |
AbstractScanner()
Create a scanner that uses the default thread factory for {#startScan(InputScanBuffer,Appendable,RuleList) asynchronous scanning}. |
protected |
AbstractScanner(ThreadFactory threadFactory)
Create a scanner that uses a specified thread factory for {#startScan(InputScanBuffer,Appendable,RuleList) asynchronous scanning}. |
Method Summary | |
---|---|
void |
scan(CharSequence charSequence,
Appendable appendable,
RuleList ruleList)
Set the scanner to initial condition, scan a CharSequence with fixed content, and output to an
Appendable . |
void |
scan(CharSequence charSequence,
Appendable appendable,
RuleList ruleList,
InputControl inputControl)
Set the scanner to initial condition, scan a CharSequence with modifiable content, and
output to an Appendable . |
void |
scan(Reader reader,
Appendable appendable,
RuleList ruleList)
Set the scanner to initial condition, scan from a Reader ,
and output to an Appendable . |
AsynchronousScanState |
startScan(InputScanBuffer inputScanBuffer,
Appendable appendable,
RuleList ruleList)
Start a new asynchonous scanner and return a view of its current state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractScanner(ThreadFactory threadFactory)
Create a scanner that uses a specified thread factory for {#startScan(InputScanBuffer,Appendable,RuleList) asynchronous scanning}. scanning.
The thread factory is not used for synchronous scanning.
protected AbstractScanner()
Create a scanner that uses the default thread factory for {#startScan(InputScanBuffer,Appendable,RuleList) asynchronous scanning}.
The thread factory is not used for synchronous scanning.
Method Detail |
---|
public AsynchronousScanState startScan(InputScanBuffer inputScanBuffer, Appendable appendable, RuleList ruleList) throws IOException, InterruptedException
Scanner
Start a new asynchonous scanner and return a view of its current state.
The Appendable
will be flushed if it is a
Flushable
, and be closed if it is also a
Closeable
startScan
in interface Scanner
inputScanBuffer
- a scannable source of character sequencesappendable
- a default destination for output from the
Scanner
ruleList
- the scanning rules
Thread
in which the scanner is running
IOException
- if an input or output error occurs
InterruptedException
- if the thread is interrupted before this
method returnspublic void scan(Reader reader, Appendable appendable, RuleList ruleList) throws IOException
Scanner
Set the scanner to initial condition, scan from a Reader
,
and output to an Appendable
.
The Appendable
will be flushed if it is a
Flushable
, but will not be closed if it is also a
Closeable
scan
in interface Scanner
reader
- a source of characters to be scanned as inputappendable
- a default destination for output from the
Scanner
ruleList
- the scanning rules
IOException
- if an input or output error occurspublic void scan(CharSequence charSequence, Appendable appendable, RuleList ruleList) throws IOException
Scanner
Set the scanner to initial condition, scan a
CharSequence
with fixed content, and output to an
Appendable
.
The Appendable
will be flushed if it is a
Flushable
, but will not be closed if it is also a
Closeable
scan
in interface Scanner
charSequence
- a character sequence containing the characters to
be scanned as inputappendable
- a default destination for output from the
Scanner
ruleList
- the scanning rules
IOException
- if an output error occurspublic void scan(CharSequence charSequence, Appendable appendable, RuleList ruleList, InputControl inputControl) throws IOException
Scanner
Set the scanner to initial condition, scan a
CharSequence
with modifiable content, and
output to an Appendable
.
The Appendable
will be flushed if it is a
Flushable
, but will not be closed if it is also a
Closeable
scan
in interface Scanner
charSequence
- a character sequence containing the characters to
be scanned as inputappendable
- a default destination for output from the
Scanner
ruleList
- the scanning rulesinputControl
- a control object that the Scanner
can use to make additional characters available in the
charSequence
IOException
- if an output error occurs
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |