Class PDFEncoding.DifferencesBuilder

  • Enclosing class:
    PDFEncoding

    public class PDFEncoding.DifferencesBuilder
    extends java.lang.Object
    Builder class for constructing the Differences array.
    • Field Detail

      • currentCode

        private int currentCode
    • Constructor Detail

      • DifferencesBuilder

        public DifferencesBuilder()
    • Method Detail

      • buildDifferencesArray

        public PDFArray buildDifferencesArray​(SingleByteEncoding encodingA,
                                              SingleByteEncoding encodingB)
        Creates an array containing the differences between two single-byte. font encodings.
        Parameters:
        encodingA - The first single-byte encoding
        encodingB - The second single-byte encoding
        Returns:
        The PDFArray of differences between encodings
      • addDifference

        private void addDifference​(int code,
                                   PDFArray differences)
        Start a new difference.
        Parameters:
        code - the starting code index inside the encoding
      • addName

        private void addName​(java.lang.String name,
                             PDFArray differences)
        Adds a character name to the current difference.
        Parameters:
        name - the character name