org.h2.store
Class LimitInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.h2.store.LimitInputStream
All Implemented Interfaces:
java.io.Closeable

public class LimitInputStream
extends java.io.FilterInputStream

An filter input stream that limits the number of bytes that can be read.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LimitInputStream(java.io.InputStream in, long maxLength)
           
 
Method Summary
 int available()
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterInputStream
close, mark, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitInputStream

public LimitInputStream(java.io.InputStream in,
                        long maxLength)
Method Detail

available

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

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.FilterInputStream

read

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

read

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