public class HexEncoder extends ByteArrayEncoder
This class encodes a byte array as hex string.
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE
The encoding name as constant.
|
| Constructor and Description |
|---|
HexEncoder()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
encode(byte[] data)
Return the byte array encoded as hex.
|
boolean |
supports(String encoding)
Return
true if the encoding is hex (case insensitive). |
forEncodingpublic 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 ByteArrayEncoderencoding - the encoding name to check.true if the name is hex.public String encode(byte[] data)
Return the byte array encoded as hex.
encode in class ByteArrayEncoderdata - the byte array to encode.Copyright © 2020 sw4j.org. All rights reserved.