public class PeekableInputStream
extends java.io.InputStream
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.
|
int |
read() |
public PeekableInputStream(java.io.InputStream is)
is
- The InputStream to parse.public int peek() throws java.io.IOException
java.io.IOException
- If an I/O exception occurs.public int peek(int depth) throws java.io.IOException
depth
- The depth to check.java.io.IOException
- If an I/O exception occurs.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException