Package nu.validator.io
Class BoundedInputStream
java.lang.Object
java.io.InputStream
nu.validator.io.BoundedInputStream
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public final class BoundedInputStream
extends java.io.InputStream
- Version:
- $Id$
- Author:
- hsivonen
-
Constructor Summary
Constructors Constructor Description BoundedInputStream(java.io.InputStream delegate, long limit, java.lang.String systemId)
-
Method Summary
-
Constructor Details
-
BoundedInputStream
public BoundedInputStream(java.io.InputStream delegate, long limit, java.lang.String systemId)- Parameters:
delegate
-limit
-
-
-
Method Details
-
available
public int available() throws java.io.IOException- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.available()
-
close
public void close() throws java.io.IOException- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.close()
-
mark
public void mark(int arg0)- Overrides:
mark
in classjava.io.InputStream
- See Also:
InputStream.mark(int)
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classjava.io.InputStream
- See Also:
InputStream.markSupported()
-
read
public int read() throws java.io.IOException- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.read()
-
read
public int read(byte[] arg0) throws java.io.IOException- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.read(byte[])
-
read
public int read(byte[] arg0, int arg1, int arg2) throws java.io.IOException- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.read(byte[], int, int)
-
reset
public void reset() throws java.io.IOException- Overrides:
reset
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.reset()
-
skip
public long skip(long arg0) throws java.io.IOException- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
- See Also:
InputStream.skip(long)
-