Class UriEncodeUtil
- java.lang.Object
-
- com.itextpdf.styledxmlparser.resolver.resource.UriEncodeUtil
-
class UriEncodeUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static int
caseDiff
The difference between the value a character in lower cases and the upper case character value.private static java.lang.String
dfltEncName
The default encoding ("UTF-8").private static java.util.BitSet
unreservedAndReserved
Set of 256 characters with the bits that don't need encoding set to on.
-
Constructor Summary
Constructors Constructor Description UriEncodeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
encode(java.lang.String s)
Encodes aString
in the default encoding and default uri scheme to an HTML-encodedString
.static java.lang.String
encode(java.lang.String s, java.lang.String enc)
Encodes aString
in a specific encoding and uri scheme to an HTML-encodedString
.
-
-
-
Field Detail
-
unreservedAndReserved
private static java.util.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:
- Constant Field Values
-
dfltEncName
private static java.lang.String dfltEncName
The default encoding ("UTF-8").
-
-
Method Detail
-
encode
public static java.lang.String encode(java.lang.String s)
Encodes aString
in the default encoding and default uri scheme to an HTML-encodedString
.- Parameters:
s
- the original string- Returns:
- the encoded string
-
encode
public static java.lang.String encode(java.lang.String s, java.lang.String enc)
Encodes aString
in a specific encoding and uri scheme to an HTML-encodedString
.- Parameters:
s
- the original stringenc
- the encoding- Returns:
- the encoded string
-
-