Class SpoofChecker.SpoofData

  • Enclosing class:
    SpoofChecker

    private static class SpoofChecker.SpoofData
    extends java.lang.Object
    • Constructor Detail

      • SpoofData

        private SpoofData()
      • SpoofData

        private SpoofData​(java.nio.ByteBuffer bytes)
                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • readData

        private void readData​(java.nio.ByteBuffer bytes)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • confusableLookup

        public void confusableLookup​(int inChar,
                                     java.lang.StringBuilder dest)
        Append the confusable skeleton transform for a single code point to a StringBuilder. The string to be appended will between 1 and 18 characters as of Unicode 9. This is the heart of the confusable skeleton generation implementation.
      • length

        public int length()
        Return the number of confusable entries in this SpoofData.
        Returns:
        The number of entries.
      • codePointAt

        public int codePointAt​(int index)
        Return the code point (key) at the specified index.
        Parameters:
        index - The index within the SpoofData.
        Returns:
        The code point.
      • appendValueTo

        public void appendValueTo​(int index,
                                  java.lang.StringBuilder dest)
        Append the confusable skeleton at the specified index to the StringBuilder dest.
        Parameters:
        index - The index within the SpoofData.
        dest - The StringBuilder to which to append the skeleton.