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
-
Field Summary
FieldsFields inherited from class org.apache.james.mime4j.io.PositionInputStream
position
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
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, skipNBytes, transferTo
-
Field Details
-
limit
private final long limit
-
-
Constructor Details
-
LimitedInputStream
-
-
Method Details
-
enforceLimit
- Throws:
IOException
-
read
- Overrides:
read
in classPositionInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classPositionInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classPositionInputStream
- Throws:
IOException
-
getBytesLeft
private int getBytesLeft()
-