public class HexDecoder extends ByteArrayDecoder
This class decodes a hex string as byte array.
Modifier and Type | Field and Description |
---|---|
static String |
TYPE
The encoding name as constant.
|
Constructor and Description |
---|
HexDecoder()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(String data)
Return the hex string decoded as byte array.
|
boolean |
supports(String encoding)
Return
true if the encoding is hex (case insensitive). |
forEncoding
public static final String TYPE
The encoding name as constant.
public boolean supports(String encoding)
Return true
if the encoding
is hex (case insensitive).
supports
in class ByteArrayDecoder
encoding
- the encoding name to check.true
if the name is hex.public byte[] decode(String data)
Return the hex string decoded as byte array.
decode
in class ByteArrayDecoder
data
- the string to decode.Copyright © 2020 sw4j.org. All rights reserved.