public class PeekableInputStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_DEPTH
The depth to peek.
|
| Constructor and Description |
|---|
PeekableInputStream(java.io.InputStream is)
The constructor accepts an InputStream to setup the object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
peek()
Peek at the next character from the stream.
|
int |
peek(int depth)
Peek at a specified depth.
|
boolean |
peek(java.lang.String str)
Peek ahead and see if the specified string is present.
|
int |
read()
Read a single byte from the stream.
|
long |
skip(long count)
Skip the specified number of bytes.
|
public static final int INITIAL_DEPTH
public PeekableInputStream(java.io.InputStream is)
is - The InputStream to parse.public int peek()
public int peek(int depth)
depth - The depth to check.public boolean peek(java.lang.String str)
str - The string we are looking for.public int read()
read in class java.io.InputStreampublic long skip(long count)
skip in class java.io.InputStreamcount - The number of bytes to skip.