Class IdentityByteArrayCodec

java.lang.Object
com.helger.base.codec.IdentityCodec<byte[]>
com.helger.base.codec.IdentityByteArrayCodec
All Implemented Interfaces:
IByteArrayCodec, IByteArrayDecoder, IByteArrayEncoder, IByteArrayStreamDecoder, IByteArrayStreamEncoder, ICodec<byte[]>, IDecoder<byte[],byte[]>, IEncoder<byte[],byte[]>

public class IdentityByteArrayCodec extends IdentityCodec<byte[]> implements IByteArrayCodec
Special implementation of IByteArrayCodec that does nothing. This is a separate class to be able to identify it from non-identity codecs.
Since:
9.1.7
Author:
Philip Helger
  • Field Details

  • Constructor Details

    • IdentityByteArrayCodec

      public IdentityByteArrayCodec()
  • Method Details

    • decode

      public void decode(byte @Nullable [] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @WillNotClose @NonNull OutputStream aOS)
      Decode (part of) a byte array.
      Specified by:
      decode in interface IByteArrayStreamDecoder
      Parameters:
      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!
    • encode

      public void encode(byte @Nullable [] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @WillNotClose @NonNull OutputStream aOS)
      Encode (part of) a byte array to an OutputStream.
      Specified by:
      encode in interface IByteArrayStreamEncoder
      Parameters:
      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.
      aOS - The output stream to write to. May not be null and is NOT closed afterwards!