@FunctionalInterface public interface IByteArrayEncoder extends IEncoder<byte[],byte[]>
| Modifier and Type | Method and Description |
|---|---|
default byte[] |
getEncoded(byte[] aDecodedBuffer)
Encode a byte array.
|
byte[] |
getEncoded(byte[] aDecodedBuffer,
int nOfs,
int nLen)
Encode a byte array.
|
default byte[] |
getEncoded(String sDecoded,
Charset aCharset)
Encode the passed string.
|
default int |
getEncodedLength(int nDecodedLen) |
@Nonnegative default int getEncodedLength(@Nonnegative int nDecodedLen)
@Nullable @ReturnsMutableCopy default byte[] getEncoded(@Nullable byte[] aDecodedBuffer)
getEncoded in interface IEncoder<byte[],byte[]>aDecodedBuffer - The byte array to be encoded. May be null.null if the parameter was
null.EncodeException - In case something goes wrong@Nullable @ReturnsMutableCopy byte[] getEncoded(@Nullable byte[] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen)
aDecodedBuffer - The byte array to be encoded. May be null.nOfs - Offset into the byte array to start from.nLen - Number of bytes starting from offset to consider.null if the parameter was
null.EncodeException - In case something goes wrong@Nullable @ReturnsMutableCopy default byte[] getEncoded(@Nullable String sDecoded, @Nonnull Charset aCharset)
sDecoded - The string to be encoded. May be null.aCharset - The charset to be used. May not be null.null if the input string is null.EncodeException - In case something goes wrongCopyright © 2014–2017 Philip Helger. All rights reserved.