Class ASCIIHexCodec

java.lang.Object
com.helger.base.codec.impl.ASCIIHexCodec
All Implemented Interfaces:
IByteArrayDecoder, IByteArrayStreamDecoder, IDecoder<byte[],byte[]>

public class ASCIIHexCodec extends Object implements IByteArrayStreamDecoder
Decoder for ASCII Hex encoding. It's similar to the Base16Codec but it ignores whitespace characters and ends with the ">" character
Author:
Philip Helger
  • Constructor Details

    • ASCIIHexCodec

      public ASCIIHexCodec()
      Constructor.
  • Method Details

    • decode

      public void decode(byte @Nullable [] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @WillNotClose @NonNull OutputStream aOS)
      Decode the passed ASCII Hex encoded buffer and write the decoded bytes to the output stream.
      Specified by:
      decode in interface IByteArrayStreamDecoder
      Parameters:
      aEncodedBuffer - The ASCII Hex encoded buffer to be decoded. May be null.
      nOfs - The offset in the buffer to start decoding from.
      nLen - The number of bytes to decode.
      aOS - The output stream to write the decoded data to. May not be null.