public class Base16Codec extends Object implements IByteArrayCodec
| Constructor and Description |
|---|
Base16Codec()
Creates a Base16 codec used for decoding and encoding.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] aEncodedBuffer,
int nOfs,
int nLen,
OutputStream aOS)
Decode (part of) a byte array.
|
void |
decode(InputStream aEncodedIS,
OutputStream aOS) |
void |
encode(byte[] aDecodedBuffer,
int nOfs,
int nLen,
OutputStream aOS)
Encode (part of) a byte array to an
OutputStream. |
void |
encode(InputStream aDecodedIS,
OutputStream aOS) |
int |
getMaximumDecodedLength(int nEncodedLen)
Get the maximum decoded length based on the provided encoded length.
|
int |
getMaximumEncodedLength(int nDecodedLen)
Get the maximum encoded length based on the provided decoded length.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecode, getDecoded, getDecodedAsString, getDecodedAsString, getDecodedAsString, getDecodedAsStringgetDecoded, getDecoded, getDecodedLengthencode, getEncoded, getEncoded, getEncoded, getEncodedAsString, getEncodedAsString, getEncodedAsStringgetEncodedLengthpublic Base16Codec()
@Nonnegative public int getMaximumEncodedLength(@Nonnegative int nDecodedLen)
IByteArrayEncodergetMaximumEncodedLength in interface IByteArrayEncodergetMaximumEncodedLength in interface IByteArrayStreamEncodernDecodedLen - The decoded length. Always ≥ 0.public void encode(@Nonnull @WillNotClose InputStream aDecodedIS, @Nonnull @WillNotClose OutputStream aOS)
public void encode(@Nullable byte[] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose OutputStream aOS)
IByteArrayStreamEncoderOutputStream.encode in interface IByteArrayStreamEncoderaDecodedBuffer - 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.aOS - The output stream to write to. May not be null and is
NOT closed afterwards!@Nonnegative public int getMaximumDecodedLength(@Nonnegative int nEncodedLen)
IByteArrayDecodergetMaximumDecodedLength in interface IByteArrayDecodernEncodedLen - The encoded length. Always ≥ 0.public void decode(@Nonnull @WillNotClose InputStream aEncodedIS, @Nonnull @WillNotClose OutputStream aOS)
public void decode(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose OutputStream aOS)
IByteArrayStreamDecoderdecode in interface IByteArrayStreamDecoderaEncodedBuffer - 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!Copyright © 2014–2019 Philip Helger. All rights reserved.