Package org.verapdf.as.filters.io
Class COSFilterASCIIReader
java.lang.Object
org.verapdf.as.filters.io.COSFilterASCIIReader
This is class-helper for decoding ASCII85 and ASCII Hex strings. It reads
next required amount of bytes and guarantees that white-space characters will
be skipped. It also looks for end of data.
- Author:
- Sergey Shemyakov
-
Constructor Summary
ConstructorDescriptionCOSFilterASCIIReader
(ASInputStream stream, boolean isASCIIHex) Constructor from encoded stream. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Method gets next portion of bytes: two for ASCII Hex encoding and five for ASCII85 encoding.
-
Constructor Details
-
COSFilterASCIIReader
Constructor from encoded stream.- Parameters:
stream
- is ASCII Hex or ASCII85 encoded stream.isASCIIHex
- is true if stream ASCII Hex encoded, false if stream is ASCII85 encoded.
-
-
Method Details
-
getNextBytes
Method gets next portion of bytes: two for ASCII Hex encoding and five for ASCII85 encoding. It ignores all the white-space characters.- Returns:
- null if end of stream is reached and next portion of bytes otherwise. If ASCII85 is chosen, method can return less than 5 bytes in case if they are last group of bytes in data string.
- Throws:
IOException
-