|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Reader com.ibm.commons.util.io.LookAheadReader
public class LookAheadReader
The lexical reader is a specific reader that cache some data of another reader and that permits a lookup of characters.
Field Summary |
---|
Fields inherited from class java.io.Reader |
---|
lock |
Constructor Summary | |
---|---|
LookAheadReader(java.io.Reader reader,
int bufferLength)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
void |
copy(java.io.Writer w)
Copy to a writer |
int |
getBufferLength()
|
int |
getChar()
Read one character ahead. |
int |
getCharAt(int pos)
Read a character ahead. |
int |
getCurrentIndex()
|
java.lang.String |
getStringAhead(int maxChars)
Get a string of # characters. |
boolean |
hasChar()
Check if the end of the strealm has been reached |
boolean |
match(char c)
|
boolean |
match(java.lang.String s)
|
boolean |
matchIgnoreCase(char c)
|
boolean |
matchIgnoreCase(java.lang.String s)
|
int |
read()
|
int |
read(char[] cbuf,
int off,
int len)
|
protected int |
readBuffer(char[] buffer,
int position,
int count)
Internal function that read data into the buffer. |
int |
readCDATABase64()
|
int |
readCDATABase64Bytes(byte[] b)
|
int |
readCDATABase64Bytes(byte[] b,
int off,
int len)
|
long |
skip(long len)
|
boolean |
skipBlanks()
|
boolean |
skipBlanks(FastStringBuffer b)
Skip a list of blanks characters (space, new line, tab...). |
void |
skipUpto(char c)
|
void |
skipUpto(java.lang.String s)
|
void |
skipUptoEOL()
|
boolean |
startsWith(char c)
|
boolean |
startsWith(java.lang.String s)
|
boolean |
startsWithIgnoreCase(char c)
|
boolean |
startsWithIgnoreCase(java.lang.String s)
|
java.lang.String |
upto(char c)
|
Methods inherited from class java.io.Reader |
---|
mark, markSupported, read, read, ready, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LookAheadReader(java.io.Reader reader, int bufferLength)
Method Detail |
---|
public int getBufferLength()
public final int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public final int readCDATABase64() throws java.io.IOException
java.io.IOException
public final int readCDATABase64Bytes(byte[] b) throws java.io.IOException
java.io.IOException
public final int readCDATABase64Bytes(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public long skip(long len) throws java.io.IOException
skip
in class java.io.Reader
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
public int getCurrentIndex()
protected int readBuffer(char[] buffer, int position, int count) throws java.io.IOException
java.io.IOException
public boolean hasChar() throws java.io.IOException
java.io.IOException
public final int getCharAt(int pos) throws java.io.IOException
pos
- the character position
java.io.IOException
public final int getChar() throws java.io.IOException
java.io.IOException
public java.lang.String getStringAhead(int maxChars) throws java.io.IOException
java.io.IOException
public boolean startsWith(char c) throws java.io.IOException
java.io.IOException
public boolean startsWithIgnoreCase(char c) throws java.io.IOException
java.io.IOException
public boolean startsWith(java.lang.String s) throws java.io.IOException
java.io.IOException
public boolean startsWithIgnoreCase(java.lang.String s) throws java.io.IOException
java.io.IOException
public boolean match(char c) throws java.io.IOException
java.io.IOException
public boolean matchIgnoreCase(char c) throws java.io.IOException
java.io.IOException
public boolean match(java.lang.String s) throws java.io.IOException
java.io.IOException
public boolean matchIgnoreCase(java.lang.String s) throws java.io.IOException
java.io.IOException
public boolean skipBlanks(FastStringBuffer b) throws java.io.IOException
java.io.IOException
public boolean skipBlanks() throws java.io.IOException
java.io.IOException
public void skipUpto(char c) throws java.io.IOException
java.io.IOException
public void skipUpto(java.lang.String s) throws java.io.IOException
java.io.IOException
public void skipUptoEOL() throws java.io.IOException
java.io.IOException
public java.lang.String upto(char c) throws java.io.IOException
java.io.IOException
public void copy(java.io.Writer w) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |