Class COSFilterInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.pdfbox.pdmodel.interactive.digitalsignature.COSFilterInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
A filtered stream that includes the bytes that are in the (begin,length) intervals passed in the
constructor.
-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionCOSFilterInputStream
(byte[] in, int[] byteRange) COSFilterInputStream
(InputStream in, int[] byteRange) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
calculateRanges
(int[] byteRange) private long
private boolean
int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) byte[]
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
ranges
private int[][] ranges -
range
private int range -
position
private long position
-
-
Constructor Details
-
COSFilterInputStream
-
COSFilterInputStream
public COSFilterInputStream(byte[] in, int[] byteRange)
-
-
Method Details
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
toByteArray
- Throws:
IOException
-
calculateRanges
private void calculateRanges(int[] byteRange) -
getRemaining
private long getRemaining() -
nextRange
- Throws:
IOException
-