fi.iki.hsivonen.io
Class BoundednputStream
java.lang.Object
   java.io.InputStream
java.io.InputStream
       fi.iki.hsivonen.io.BoundednputStream
fi.iki.hsivonen.io.BoundednputStream
- All Implemented Interfaces: 
- Closeable
- public class BoundednputStream 
- extends InputStream
- Version:
- $Id: BoundednputStream.java,v 1.2 2005/07/24 07:35:24 hsivonen Exp $
- Author:
- hsivonen
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
delegate
private InputStream delegate
counter
private long counter
limit
private long limit
BoundednputStream
public BoundednputStream(InputStream delegate,
                         long limit)
- Parameters:
- delegate-
- limit-
checkLimit
private void checkLimit()
                 throws IOException
- 
- Throws:
- IOException
 
available
public int available()
              throws IOException
- 
- Overrides:
- availablein class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.available()
 
close
public void close()
           throws IOException
- 
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.close()
 
mark
public void mark(int arg0)
- 
- Overrides:
- markin class- InputStream
 
- 
- See Also:
- InputStream.mark(int)
 
markSupported
public boolean markSupported()
- 
- Overrides:
- markSupportedin class- InputStream
 
- 
- See Also:
- InputStream.markSupported()
 
read
public int read()
         throws IOException
- 
- Specified by:
- readin class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.read()
 
read
public int read(byte[] arg0)
         throws IOException
- 
- Overrides:
- readin class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.read(byte[])
 
read
public int read(byte[] arg0,
                int arg1,
                int arg2)
         throws IOException
- 
- Overrides:
- readin class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.read(byte[], int, int)
 
reset
public void reset()
           throws IOException
- 
- Overrides:
- resetin class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.reset()
 
skip
public long skip(long arg0)
          throws IOException
- 
- Overrides:
- skipin class- InputStream
 
- 
- Throws:
- IOException
- See Also:
- InputStream.skip(long)