Class CosToken


  • public final class CosToken
    extends java.lang.Object
    The PDF parser.
    • 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MIN_FLOAT_APPROACHING_TO_ZERO

        public static final java.math.BigDecimal MIN_FLOAT_APPROACHING_TO_ZERO
      • MAX_REAL

        public static final java.math.BigDecimal MAX_REAL
    • 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