|
GXPARSE hosted by |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InputScanBuffer
The sequence of characters that are currently available for pattern matching.
Some implementations of ScanBuffer
may hold much more data
than will fit in memory. In such cases, copying very large numbers of
characters to memory or invoking the toString()
on the
ScanBuffer
(or on a large subsequence of the
ScanBuffer
) may cause an OutOfMemoryError
.
The content of a ScanBuffer
, and any of its
subsquences or sub-buffer
s, is undefined outside an
instance of ScanMatch
, ScanAction
, or
ScanRule
. When persistent data is required, the data
should be obtained by copying the characters or by invoking the
toString
method of the appropriate ScanBuffer
,
subsequence or sub-buffer.
Method Summary | |
---|---|
void |
discardMatchedText()
Release all previously accepted input
data. |
int |
fill()
Read characters into free space in the buffer. |
Map<String,CharSequence> |
getMap()
Get the map that supports saving
and retrieving character sequences as
temporary values. |
boolean |
hitLast()
Indicate whether the last character in the buffer has been accessed since the previous invocation of this function. |
ScanState |
setScanState(ScanState scanState)
Set a reference to the scanner state for use by the
buffer match and act method. |
Methods inherited from interface ca.gorman.util.scan.ScanBuffer |
---|
accept, act, put, subBuffer |
Methods inherited from interface java.lang.CharSequence |
---|
charAt, length, subSequence, toString |
Methods inherited from interface ca.gorman.util.scan.Expandable |
---|
expand |
Method Detail |
---|
void discardMatchedText() throws IOException
Release all previously accepted input
data.
Warning:
In some implementations, the previously accepted
MatchedText
instances will no longer contain valid
data.
IOException
int fill() throws IOException
Read characters into free space in the buffer.
This method may block until characters become available.
IOException
boolean hitLast()
Indicate whether the last character in the buffer has been accessed since the previous invocation of this function.
Resets the indicator to false
until the next time that the
last character is accessed.
Map<String,CharSequence> getMap()
Get the map that supports
saving
and retrieving
character sequences as
temporary values.
ScanState setScanState(ScanState scanState)
Set a reference to the scanner state
for use by the
buffer match and act
method.
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |