org.apache.abdera.util.io
Class DynamicPushbackInputStream

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
All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
RewindableInputStream

public class DynamicPushbackInputStream
extends java.io.PushbackInputStream

PushbackInputStream implementation that performs dynamic resizing of the unread buffer


Field Summary
 
Fields inherited from class java.io.PushbackInputStream
buf, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
DynamicPushbackInputStream(java.io.InputStream in)
           
DynamicPushbackInputStream(java.io.InputStream in, int initialSize)
           
 
Method Summary
 int clear()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 int shrink()
           
 long skip(long n)
           
 void unread(byte[] b, int off, int len)
           
 void unread(int b)
           
 
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

DynamicPushbackInputStream

public DynamicPushbackInputStream(java.io.InputStream in)

DynamicPushbackInputStream

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

clear

public int clear()

shrink

public int shrink()

unread

public void unread(byte[] b,
                   int off,
                   int len)
            throws java.io.IOException
Overrides:
unread in class java.io.PushbackInputStream
Throws:
java.io.IOException

unread

public void unread(int b)
            throws java.io.IOException
Overrides:
unread in class java.io.PushbackInputStream
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.PushbackInputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.PushbackInputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.PushbackInputStream
Throws:
java.io.IOException