@FunctionalInterface public interface IByteArrayStreamDecoder extends IByteArrayDecoder
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] aEncodedBuffer,
int nOfs,
int nLen,
OutputStream aOS)
Decode (part of) a byte array.
|
default void |
decode(byte[] aEncodedBuffer,
OutputStream aOS)
Decode a byte array.
|
default byte[] |
getDecoded(byte[] aEncodedBuffer,
int nOfs,
int nLen)
Decode a byte array.
|
default String |
getDecodedAsString(byte[] aEncodedBuffer,
Charset aCharset) |
default String |
getDecodedAsString(byte[] aEncodedBuffer,
int nOfs,
int nLen,
Charset aCharset) |
default String |
getDecodedAsString(String sEncoded,
Charset aCharset)
Decode the passed string.
|
default String |
getDecodedAsString(String sEncoded,
Charset aEncodedCharset,
Charset aDecodedCharset)
Decode the passed string.
|
getDecoded, getDecoded, getMaximumDecodedLengthdefault void decode(@Nullable byte[] aEncodedBuffer, @Nonnull @WillNotClose OutputStream aOS)
aEncodedBuffer - The byte array to be decoded. May be null.aOS - The output stream to write to. May not be null and is
NOT closed afterwards!DecodeException - in case something goes wrongvoid decode(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose OutputStream aOS)
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.aOS - The output stream to write to. May not be null and is
NOT closed afterwards!DecodeException - in case something goes wrong@Nullable @ReturnsMutableCopy default byte[] getDecoded(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen)
getDecoded in interface IByteArrayDecoderaEncodedBuffer - 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 default String getDecodedAsString(@Nullable byte[] aEncodedBuffer, @Nonnull Charset aCharset)
@Nullable default String getDecodedAsString(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull Charset aCharset)
@Nullable default String getDecodedAsString(@Nullable String sEncoded, @Nonnull Charset aCharset)
sEncoded - The string to be decoded. May be null.aCharset - The charset to be used for encoding AND decoding. May not be
null.null if the input string is null.DecodeException - in case something goes wrong@Nullable default String getDecodedAsString(@Nullable String sEncoded, @Nonnull Charset aEncodedCharset, @Nonnull Charset aDecodedCharset)
sEncoded - The string to be decoded. May be null.aEncodedCharset - The charset to be used for the encoded string. May not be
null.aDecodedCharset - The charset to be used for the decoded result string. May not be
null.null if the input string is null.DecodeException - in case something goes wrongCopyright © 2014–2022 Philip Helger. All rights reserved.