Class PDFDocEncoding


  • final class PDFDocEncoding
    extends java.lang.Object
    The "PDFDocEncoding" encoding. Note that this is *not* a Type 1 font encoding, it is used only within PDF "text strings".
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int[] CODE_TO_UNI  
      private static char REPLACEMENT_CHARACTER  
      private static java.util.Map<java.lang.Character,​java.lang.Integer> UNI_TO_CODE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PDFDocEncoding()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean containsChar​(char character)
      Returns true if the given character is available in PDFDocEncoding.
      static byte[] getBytes​(java.lang.String text)
      Returns the given string encoded with PDFDocEncoding.
      private static void set​(int code, char unicode)  
      static java.lang.String toString​(byte[] bytes)
      Returns the string representation of the given PDFDocEncoded bytes.
      • Methods inherited from class java.lang.Object

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

      • CODE_TO_UNI

        private static final int[] CODE_TO_UNI
      • UNI_TO_CODE

        private static final java.util.Map<java.lang.Character,​java.lang.Integer> UNI_TO_CODE
    • Constructor Detail

      • PDFDocEncoding

        private PDFDocEncoding()
    • Method Detail

      • set

        private static void set​(int code,
                                char unicode)
      • toString

        public static java.lang.String toString​(byte[] bytes)
        Returns the string representation of the given PDFDocEncoded bytes.
      • getBytes

        public static byte[] getBytes​(java.lang.String text)
        Returns the given string encoded with PDFDocEncoding.
      • containsChar

        public static boolean containsChar​(char character)
        Returns true if the given character is available in PDFDocEncoding.
        Parameters:
        character - UTF-16 character