Package org.apache.james.mime4j.io
Class LimitedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.james.mime4j.io.PositionInputStream
-
- org.apache.james.mime4j.io.LimitedInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class LimitedInputStream extends PositionInputStream
-
-
Field Summary
-
Fields inherited from class org.apache.james.mime4j.io.PositionInputStream
position
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description LimitedInputStream(InputStream instream, long limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
int
read(byte[] b, int off, int len)
long
skip(long n)
-
Methods inherited from class org.apache.james.mime4j.io.PositionInputStream
available, close, getPosition, mark, markSupported, reset
-
Methods inherited from class java.io.FilterInputStream
read
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
LimitedInputStream
public LimitedInputStream(InputStream instream, long limit)
-
-
Method Detail
-
read
public int read() throws IOException
- Overrides:
read
in classPositionInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classPositionInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Overrides:
skip
in classPositionInputStream
- Throws:
IOException
-
-