Class PercentEscaper.Builder

    • Method Detail

      • addSafeCharRange

        public PercentEscaper.Builder addSafeCharRange​(char start,
                                                       char end)
        Adds a range of characters to the set of characters that do not need to be encoded.
        Parameters:
        start - the first safe character in the range
        end - the last safe character in the range
        Returns:
        this
      • addSafeChars

        public PercentEscaper.Builder addSafeChars​(String safeChars)
        Adds each character in the string to the set of characters that do not need to be encoded.
        Parameters:
        safeChars - characters that do not need to be encoded
        Returns:
        this
      • addUnsafeCharRange

        public PercentEscaper.Builder addUnsafeCharRange​(char start,
                                                         char end)
        Adds a range of characters to the set of characters that need to be encoded.
        Parameters:
        start - the first unsafe character in the range
        end - the last unsafe character in the range
        Returns:
        this
      • addUnsafeChars

        public PercentEscaper.Builder addUnsafeChars​(String unsafeChars)
        Adds each character in the string to the set of characters that need to be encoded.
        Parameters:
        unsafeChars - characters that need to be encoded
        Returns:
        this
      • plusForSpace

        public PercentEscaper.Builder plusForSpace​(boolean plusForSpace)
        Parameters:
        plusForSpace - true if ASCII space should be escaped to + rather than %20
        Returns:
        this
      • useUppercase

        public PercentEscaper.Builder useUppercase​(boolean useUppercase)
        Parameters:
        useUppercase - true if hex characters should be upper case
        Returns:
        this