Class Chars3986


  • public class Chars3986
    extends java.lang.Object
    Characters and character classes
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static char EOF
      End of file/string marker - this is not a valid Unicode codepoint.
    • Constructor Summary

      Constructors 
      Constructor Description
      Chars3986()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String displayChar​(char ch)
      Return a display string for a character suitable for error messages.
      static boolean genDelims​(char ch)
      RFC 3986 : gen-delims / sub-delims
      static int hexValue​(char ch)
      Return the value of a hex digit, upper or lower case
      static boolean int_isIPrivate​(int ch)  
      static boolean int_isUcsChar​(int ch)  
      static boolean isAlpha​(char ch)  
      static boolean isDigit​(char ch)  
      static boolean isHexDigit​(char ch)
      HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" but also lower case (non-normalized form).
      static boolean isIAlpha​(char ch)
      RFC3987: International alphabetic.
      static boolean isIPChar​(char ch, java.lang.String str, int posn)
      RFC3987 ipchar
      static boolean isIPrivate​(char ch)
      Java charcater part of iprivate
      static boolean isPChar​(char ch, java.lang.String str, int posn)
      RFC3986 pchar
      static boolean isPctEncoded​(char ch, java.lang.CharSequence s, int x)
      Test whether the character at location 'x' is percent-encoded.
      static boolean isUcsChar​(char ch)  
      static boolean iunreserved​(char ch)
      RFC 3987 : iunreserved
      static boolean range​(int ch, int start, int finish)
      Test whether a character is in a character range (both ends inclusive)
      static boolean reservered​(char ch)
      RFC 3986 : reservered
      static boolean subDelims​(char ch)
      RFC 3986 : sub-delims
      static boolean unreserved​(char ch)
      RFC 3986 : unreserved
      • Methods inherited from class java.lang.Object

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

      • EOF

        public static final char EOF
        End of file/string marker - this is not a valid Unicode codepoint.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Chars3986

        public Chars3986()
    • Method Detail

      • isPChar

        public static boolean isPChar​(char ch,
                                      java.lang.String str,
                                      int posn)
        RFC3986 pchar
      • isIPChar

        public static boolean isIPChar​(char ch,
                                       java.lang.String str,
                                       int posn)
        RFC3987 ipchar
      • isPctEncoded

        public static boolean isPctEncoded​(char ch,
                                           java.lang.CharSequence s,
                                           int x)
        Test whether the character at location 'x' is percent-encoded. This operation needs to looks at next two characters if, and only if, the character is '%'

        This function looks ahead 2 characters which will be parsed but likely they are in the L1 or L2 cache and the alternative is more complex logic (return the new character position in some way).

      • isAlpha

        public static boolean isAlpha​(char ch)
      • isIAlpha

        public static boolean isIAlpha​(char ch)
        RFC3987: International alphabetic.
      • isDigit

        public static boolean isDigit​(char ch)
      • isHexDigit

        public static boolean isHexDigit​(char ch)
        HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" but also lower case (non-normalized form). See RFC 3986 sec 6.2.2.1
      • isUcsChar

        public static boolean isUcsChar​(char ch)
      • int_isUcsChar

        public static boolean int_isUcsChar​(int ch)
      • isIPrivate

        public static boolean isIPrivate​(char ch)
        Java charcater part of iprivate
      • int_isIPrivate

        public static boolean int_isIPrivate​(int ch)
      • unreserved

        public static boolean unreserved​(char ch)
        RFC 3986 : unreserved
      • iunreserved

        public static boolean iunreserved​(char ch)
        RFC 3987 : iunreserved
      • reservered

        public static boolean reservered​(char ch)
        RFC 3986 : reservered
      • subDelims

        public static boolean subDelims​(char ch)
        RFC 3986 : sub-delims
      • genDelims

        public static boolean genDelims​(char ch)
        RFC 3986 : gen-delims / sub-delims
      • displayChar

        public static java.lang.String displayChar​(char ch)
        Return a display string for a character suitable for error messages.
      • range

        public static boolean range​(int ch,
                                    int start,
                                    int finish)
        Test whether a character is in a character range (both ends inclusive)
      • hexValue

        public static int hexValue​(char ch)
        Return the value of a hex digit, upper or lower case