Class CosToken
java.lang.Object
com.adobe.internal.pdftoolkit.core.cos.CosToken
The PDF parser.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidskipObject(CosDocument doc, InputByteStream buf, byte b) This method tokenizes the document stream to reach the position where object definition is completed.static byteSkips over whitespace in the input stream.static bytetoHexDigit(byte b) Converts the specified hexidecimal character to a byte value.
-
Field Details
-
MIN_FLOAT_APPROACHING_TO_ZERO
-
MAX_REAL
-
-
Method Details
-
toHexDigit
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
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:
IOExceptionPDFCosParseException
-
skipObject
public static void skipObject(CosDocument doc, InputByteStream buf, byte b) throws PDFCosParseException, 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:
PDFCosParseExceptionIOExceptionPDFSecurityExceptionPDFIOExceptionPDFIOException
-