Class CosToken
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.cos.CosToken
-
public final class CosToken extends java.lang.Object
The PDF parser.
-
-
Field Summary
Fields Modifier and Type Field Description static java.math.BigDecimal
MAX_REAL
static java.math.BigDecimal
MIN_FLOAT_APPROACHING_TO_ZERO
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
skipObject(CosDocument doc, InputByteStream buf, byte b)
This method tokenizes the document stream to reach the position where object definition is completed.static byte
skipWhitespace(InputByteStream buf)
Skips over whitespace in the input stream.static byte
toHexDigit(byte b)
Converts the specified hexidecimal character to a byte value.
-
-
-
Method Detail
-
toHexDigit
public static byte toHexDigit(byte b) throws PDFCosParseException
Converts the specified hexidecimal character to a byte value. For example, the hex character 'A' is converted to the value 10.- Parameters:
b
- Hex character to convert- Returns:
- Byte value corresponding to the specified hex character.
- Throws:
PDFCosParseException
-
skipWhitespace
public static byte skipWhitespace(InputByteStream buf) throws java.io.IOException, PDFCosParseException
Skips over whitespace in the input stream. Whitespace is defined in section 3.1.1 of the PDF Reference Manual version 1.4. For the purposes of this method, comments are also considered whitespace.- Parameters:
buf
- Buffer to parse- Returns:
- The first non-whitespace byte encountered.
- Throws:
java.io.IOException
PDFCosParseException
-
skipObject
public static void skipObject(CosDocument doc, InputByteStream buf, byte b) throws PDFCosParseException, java.io.IOException, PDFSecurityException, PDFIOException
This method tokenizes the document stream to reach the position where object definition is completed.- Parameters:
doc
- Document containing the COS objectbuf
- Buffer to skipb
- Starting byte- Throws:
PDFCosParseException
java.io.IOException
PDFSecurityException
PDFIOException
PDFIOException
-
-