public abstract class BinaryEncoder extends Object
| Constructor and Description |
|---|
BinaryEncoder() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encode(byte[] input)
Encodes the given bytes.
|
ByteBuffer |
encode(ByteBuffer input)
Encodes the bytes in the given buffer.
|
String |
encodeToString(BigInteger input)
Encodes the given
BigInteger into a string. |
abstract String |
encodeToString(byte[] input)
Encodes the given bytes into a string.
|
boolean |
supportsStreaming()
Checks whether this encoder supports streaming.
|
OutputStream |
wrap(OutputStream destination)
Returns an
OutputStream encoding the bytes written to it into the given OutputStream. |
public byte[] encode(byte[] input)
IllegalArgumentException - if input are nullpublic ByteBuffer encode(ByteBuffer input)
IllegalArgumentException - if input is nullpublic String encodeToString(BigInteger input)
BigInteger into a string.IllegalArgumentException - if input is nullpublic abstract String encodeToString(byte[] input)
IllegalArgumentException - if input are nullpublic boolean supportsStreaming()
public OutputStream wrap(OutputStream destination)
OutputStream encoding the bytes written to it into the given OutputStream.UnsupportedOperationException - if this encoder does not support streaming