|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream com.ibm.commons.util.io.LookAheadInputStream
public class LookAheadInputStream
The lexical inputstream is a specific inputstrean that cache some data of another inputstream and that permits a lookup of characters.
Constructor Summary | |
---|---|
LookAheadInputStream(java.io.InputStream is,
int bufferLength)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
int |
getBufferLength()
|
int |
getByte()
Read one byte ahead. |
byte[] |
getByteAhead(int maxChars)
Get a string of # characters. |
int |
getByteAt(int pos)
Read a byte ahead. |
char |
getChar()
|
char |
getCharAt(int index)
|
int |
getCurrentIndex()
|
boolean |
hasByte()
Check if the end of the stream 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(byte[] cbuf,
int off,
int len)
|
protected int |
readBuffer(byte[] buffer,
int position,
int count)
Internal function that read data into the buffer. |
long |
skip(long len)
|
boolean |
skipBlanks()
|
boolean |
skipBlanks(FastStringBuffer b)
Skip a list of blanks characters (space, new line, tab...). |
void |
skipUpto(char c)
|
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.InputStream |
---|
available, mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LookAheadInputStream(java.io.InputStream is, int bufferLength)
Method Detail |
---|
public int getBufferLength()
public final int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long len) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public int getCurrentIndex()
protected int readBuffer(byte[] buffer, int position, int count) throws java.io.IOException
java.io.IOException
public boolean hasByte() throws java.io.IOException
java.io.IOException
public final int getByteAt(int pos) throws java.io.IOException
pos
- the character position
java.io.IOException
public final int getByte() throws java.io.IOException
java.io.IOException
public byte[] getByteAhead(int maxChars) throws java.io.IOException
java.io.IOException
public char getChar() throws java.io.IOException
java.io.IOException
public char getCharAt(int index) 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 java.lang.String upto(char c) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |