org.apache.abdera.util.io
Class PeekAheadInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.PushbackInputStream
              extended by org.apache.abdera.util.io.DynamicPushbackInputStream
                  extended by org.apache.abdera.util.io.RewindableInputStream
                      extended by 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()


Field Summary
 
Fields inherited from class java.io.PushbackInputStream
buf, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
PeekAheadInputStream(java.io.InputStream in)
           
PeekAheadInputStream(java.io.InputStream in, int initialSize)
           
 
Method Summary
 int peek()
           
 int peek(byte[] buf)
           
 int peek(byte[] buf, int off, int len)
           
 
Methods inherited from class org.apache.abdera.util.io.RewindableInputStream
position, read, read, rewind, rewind, rewind, skip
 
Methods inherited from class org.apache.abdera.util.io.DynamicPushbackInputStream
clear, shrink, unread, unread
 
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
 

Constructor Detail

PeekAheadInputStream

public PeekAheadInputStream(java.io.InputStream in)

PeekAheadInputStream

public PeekAheadInputStream(java.io.InputStream in,
                            int initialSize)
Method Detail

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