Package org.apache.xmlbeans.impl.util
Class HexBin
java.lang.Object
org.apache.xmlbeans.impl.util.HexBin
public final class HexBin extends Object
format validation
This class encodes/decodes hexadecimal data
-
Constructor Summary
Constructors Constructor Description HexBin()
-
Method Summary
Modifier and Type Method Description static String
bytesToString(byte[] binaryData)
Converts bytes to a hex stringstatic byte[]
decode(byte[] binaryData)
static String
decode(String binaryData)
Decodes Hex data into octectsstatic byte[]
encode(byte[] binaryData)
array of byte to encodestatic String
encode(String binaryData)
Encodes octects (using utf-8) into Hex datastatic byte[]
stringToBytes(String hexEncoded)
Converts a hex string to a byte array.
-
Constructor Details
-
HexBin
public HexBin()
-
-
Method Details
-
bytesToString
Converts bytes to a hex string -
stringToBytes
Converts a hex string to a byte array. -
encode
public static byte[] encode(byte[] binaryData)array of byte to encode- Parameters:
binaryData
-- Returns:
- return encode binary array
-
decode
public static byte[] decode(byte[] binaryData) -
decode
Decodes Hex data into octects- Parameters:
binaryData
- String containing Hex data- Returns:
- string containing decoded data.
-
encode
Encodes octects (using utf-8) into Hex data- Parameters:
binaryData
- String containing Hex data- Returns:
- string containing decoded data.
-