org.apache.abdera.util.io
Class PeekAheadInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.PushbackInputStream
org.apache.abdera.util.io.DynamicPushbackInputStream
org.apache.abdera.util.io.RewindableInputStream
org.apache.abdera.util.io.PeekAheadInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class PeekAheadInputStream
- extends RewindableInputStream
A version of RewindableInputStream that provides methods for peeking ahead
in the stream (equivalent to read() followed by an appropriate unread()
Fields inherited from class java.io.PushbackInputStream |
buf, pos |
Fields inherited from class java.io.FilterInputStream |
in |
Method Summary |
int |
peek()
|
int |
peek(byte[] buf)
|
int |
peek(byte[] buf,
int off,
int len)
|
Methods inherited from class java.io.PushbackInputStream |
available, close, mark, markSupported, reset, unread |
Methods inherited from class java.io.FilterInputStream |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeekAheadInputStream
public PeekAheadInputStream(java.io.InputStream in)
PeekAheadInputStream
public PeekAheadInputStream(java.io.InputStream in,
int initialSize)
peek
public int peek()
throws java.io.IOException
- Throws:
java.io.IOException
peek
public int peek(byte[] buf)
throws java.io.IOException
- Throws:
java.io.IOException
peek
public int peek(byte[] buf,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException