| Constructor and Description |
|---|
HexEncoder()
Creates a new instance that does not delimit bytes in the output hex string.
|
HexEncoder(boolean delimitBytes)
Creates a new instance with optional colon-delimiting of bytes.
|
HexEncoder(boolean delimitBytes,
boolean uppercase)
Creates a new instance with optional colon-delimiting of bytes and uppercase output.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(ByteBuffer input,
CharBuffer output)
Encodes bytes in input buffer into characters placed in the output buffer.
|
void |
finalize(CharBuffer output)
Performs final output encoding (e.g. padding) after all input bytes have been provided.
|
int |
outputSize(int inputSize)
Expected number of characters in the output buffer for an input buffer of the given size.
|
public HexEncoder()
public HexEncoder(boolean delimitBytes)
delimitBytes - True to delimit every two characters (i.e. every byte) with ':' character.public HexEncoder(boolean delimitBytes,
boolean uppercase)
delimitBytes - True to delimit every two characters (i.e. every byte) with ':' character.uppercase - True to output uppercase alphabetic characters, false for lowercase.public void encode(ByteBuffer input, CharBuffer output) throws EncodingException
EncoderEncoder.finalize(java.nio.CharBuffer) after all input bytes have been provided.encode in interface Encoderinput - Input byte buffer.output - Output character buffer.EncodingException - on encoding errors.public void finalize(CharBuffer output) throws EncodingException
Encoderfinalize in interface Encoderoutput - Output character buffer.EncodingException - on encoding errors.public int outputSize(int inputSize)
EncoderoutputSize in interface EncoderinputSize - Size of input buffer in bytes.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.