Class MyBufferedInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--MyBufferedInputStream

public class MyBufferedInputStream
extends java.io.FilterInputStream


Field Summary
protected  byte[] buffer
           
protected  int bufferCapacity
           
protected  int bufferIndex
           
protected  int bufferSize
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Fields inherited from class java.io.InputStream
SKIP_BUFFER_SIZE, skipBuffer
 
Constructor Summary
MyBufferedInputStream(java.io.InputStream in)
           
MyBufferedInputStream(java.io.InputStream in, int bufferCapacity)
           
 
Method Summary
 int available()
           
protected  void fillBuffer()
           
 int read()
           
 int read(byte[] data, int offset, int length)
           
 long skip(long amount)
           
 
Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

buffer

protected byte[] buffer

bufferSize

protected int bufferSize

bufferIndex

protected int bufferIndex

bufferCapacity

protected int bufferCapacity
Constructor Detail

MyBufferedInputStream

public MyBufferedInputStream(java.io.InputStream in)

MyBufferedInputStream

public MyBufferedInputStream(java.io.InputStream in,
                             int bufferCapacity)
Method Detail

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.FilterInputStream

read

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

fillBuffer

protected void fillBuffer()
                   throws java.io.IOException

read

public int read(byte[] data,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream

skip

public long skip(long amount)
          throws java.io.IOException
Overrides:
skip in class java.io.FilterInputStream