Class UriEncodeUtil

java.lang.Object
com.itextpdf.styledxmlparser.resolver.resource.UriEncodeUtil

class UriEncodeUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int
    The difference between the value a character in lower cases and the upper case character value.
    private static String
    The default encoding ("UTF-8").
    private static BitSet
    Set of 256 characters with the bits that don't need encoding set to on.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Encodes a String in the default encoding and default uri scheme to an HTML-encoded String.
    static String
    encode(String s, String enc)
    Encodes a String in a specific encoding and uri scheme to an HTML-encoded String.

    Methods inherited from class java.lang.Object

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

    • unreservedAndReserved

      private static BitSet unreservedAndReserved
      Set of 256 characters with the bits that don't need encoding set to on.
    • caseDiff

      private static final int caseDiff
      The difference between the value a character in lower cases and the upper case character value.
      See Also:
    • dfltEncName

      private static String dfltEncName
      The default encoding ("UTF-8").
  • Constructor Details

    • UriEncodeUtil

      UriEncodeUtil()
  • Method Details

    • encode

      public static String encode(String s)
      Encodes a String in the default encoding and default uri scheme to an HTML-encoded String.
      Parameters:
      s - the original string
      Returns:
      the encoded string
    • encode

      public static String encode(String s, String enc)
      Encodes a String in a specific encoding and uri scheme to an HTML-encoded String.
      Parameters:
      s - the original string
      enc - the encoding
      Returns:
      the encoded string