Package org.apache.fop.util
Class HexEncoder
java.lang.Object
org.apache.fop.util.HexEncoder
A helper class to create hex-encoded representations of numbers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
encode
(int c) Returns an hex encoding of the given character as: 4-character string in case of non-BMP character 6-character string in case of BMP characterstatic String
encode
(int n, int width) Returns an hex encoding of the given number as a string of the given length, left-padded with zeros if necessary.
-
Method Details
-
encode
Returns an hex encoding of the given number as a string of the given length, left-padded with zeros if necessary.- Parameters:
n
- a numberwidth
- required length of the string- Returns:
- an hex-encoded representation of the number
-
encode
Returns an hex encoding of the given character as:- 4-character string in case of non-BMP character
- 6-character string in case of BMP character
- Parameters:
c
- a character- Returns:
- an hex-encoded representation of the character
-