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 tokenExceptionpublic String readToken(String string) throws Exception
string - the token to find in the streamExceptionpublic String read(String begin, String end) throws IOException
IOExceptionpublic String read(String string) throws IOException
IOExceptionpublic String seek(String begin, String end) throws IOException
IOExceptionpublic String seek(String string) throws IOException
IOExceptionpublic String peek(String begin, String end) throws IOException
IOExceptionpublic String peek(String string) throws IOException
IOExceptionpublic StreamLexer mark() throws IOException
IOExceptionpublic void unmark()
public StreamLexer mark(String limit) throws IOException
IOExceptionpublic boolean readAndMark(String begin, String end) throws IOException
IOExceptionpublic boolean seekAndMark(String begin, String end) throws IOException
IOExceptionpublic boolean readAndUnmark()
throws IOException
IOExceptionpublic boolean seekAndUnmark()
throws IOException
IOExceptionCopyright © 2016 The Codehaus Foundation. All rights reserved.