Class PDFDecoder
java.lang.Object
org.openpdf.renderer.decode.PDFDecoder
A PDF Decoder encapsulates all the methods of decoding a stream of bytes
based on all the various encoding methods.
You should use the decodeStream() method of this object rather than using any of the decoders directly.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBufferdecodeStream(PDFObject dict, ByteBuffer streamBuf, Set<String> filterLimits) decode a byte[] stream using the filters specified in the object's dictionary (passed as argument 1).static booleanisEncrypted(PDFObject dict) Determines whether a stream is encrypted or not; note that encodings (e.g., Flate, LZW) are not considered encryptions.static booleanisLastFilter(PDFObject dict, Set<String> filters)
-
Field Details
-
DCT_FILTERS
-
-
Method Details
-
isLastFilter
- Throws:
IOException
-
decodeStream
public static ByteBuffer decodeStream(PDFObject dict, ByteBuffer streamBuf, Set<String> filterLimits) throws IOException decode a byte[] stream using the filters specified in the object's dictionary (passed as argument 1).- Parameters:
dict- the dictionary associated with the streamstreamBuf- the data in the stream, as a byte buffer- Throws:
IOException
-
isEncrypted
Determines whether a stream is encrypted or not; note that encodings (e.g., Flate, LZW) are not considered encryptions.- Parameters:
dict- the stream dictionary- Returns:
- whether the stream is encrypted
- Throws:
IOException- if the stream dictionary can't be read
-