@FunctionalInterface public interface IByteArrayDecoder extends IDecoder<byte[],byte[]>
Modifier and Type | Method and Description |
---|---|
default byte[] |
getDecoded(byte[] aEncodedBuffer)
Decode a byte array.
|
byte[] |
getDecoded(byte[] aEncodedBuffer,
int nOfs,
int nLen)
Decode a byte array.
|
default byte[] |
getDecoded(String sEncoded,
Charset aCharset)
Decode the passed string.
|
default int |
getDecodedLength(int nEncodedLen)
Deprecated.
Use
getMaximumDecodedLength(int) instead |
default int |
getMaximumDecodedLength(int nEncodedLen)
Get the maximum decoded length based on the provided encoded length.
|
@Nonnegative @Deprecated default int getDecodedLength(@Nonnegative int nEncodedLen)
getMaximumDecodedLength(int)
insteadnEncodedLen
- The encoded length. Always ≥ 0.@Nonnegative default int getMaximumDecodedLength(@Nonnegative int nEncodedLen)
nEncodedLen
- The encoded length. Always ≥ 0.@Nullable @ReturnsMutableCopy default byte[] getDecoded(@Nullable byte[] aEncodedBuffer)
getDecoded
in interface IDecoder<byte[],byte[]>
aEncodedBuffer
- The byte array to be decoded. May be null
.null
if the parameter was
null
.DecodeException
- in case something goes wrong@Nullable @ReturnsMutableCopy byte[] getDecoded(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen)
aEncodedBuffer
- The byte array to be decoded. 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
.DecodeException
- in case something goes wrong@Nullable @ReturnsMutableCopy default byte[] getDecoded(@Nullable String sEncoded, @Nonnull Charset aCharset)
sEncoded
- The string to be decoded. May be null
.aCharset
- The charset to be used. May not be null
.null
if the input string is null
.DecodeException
- in case something goes wrongCopyright © 2014–2019 Philip Helger. All rights reserved.