public class StreamLexer extends Object
Constructor and Description |
---|
StreamLexer(InputStream delegate) |
Modifier and Type | Method and Description |
---|---|
StreamLexer |
mark() |
StreamLexer |
mark(String limit) |
String |
peek(String string) |
String |
peek(String begin,
String end) |
String |
read(String string) |
String |
read(String begin,
String end) |
boolean |
readAndMark(String begin,
String end) |
boolean |
readAndUnmark() |
String |
readToken(String string)
Seeks in the stream till it finds and has completely read the token, then stops.
|
String |
readToken(String begin,
String end)
Seeks in the stream till it finds the start token, reads into a buffer till it finds the end token, then returns the token (the buffer) as a String.
|
String |
seek(String string) |
String |
seek(String begin,
String end) |
boolean |
seekAndMark(String begin,
String end) |
boolean |
seekAndUnmark() |
void |
unmark() |
public StreamLexer(InputStream delegate)
public String readToken(String begin, String end) throws Exception
begin
- start tokenend
- end tokenException
public String readToken(String string) throws Exception
string
- the token to find in the streamException
public String read(String begin, String end) throws IOException
IOException
public String read(String string) throws IOException
IOException
public String seek(String begin, String end) throws IOException
IOException
public String seek(String string) throws IOException
IOException
public String peek(String begin, String end) throws IOException
IOException
public String peek(String string) throws IOException
IOException
public StreamLexer mark() throws IOException
IOException
public void unmark()
public StreamLexer mark(String limit) throws IOException
IOException
public boolean readAndMark(String begin, String end) throws IOException
IOException
public boolean seekAndMark(String begin, String end) throws IOException
IOException
public boolean readAndUnmark() throws IOException
IOException
public boolean seekAndUnmark() throws IOException
IOException
Copyright © 2018 The Codehaus Foundation. All rights reserved.