Package com.helger.commons.codec
Class RunLengthCodec
java.lang.Object
com.helger.commons.codec.RunLengthCodec
- All Implemented Interfaces:
IByteArrayDecoder,IByteArrayStreamDecoder,IDecoder<byte[],byte[]>
Decoder for run length encoding
- Author:
- Philip Helger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(byte[] aEncodedBuffer, int nOfs, int nLen, OutputStream aOS) Decode (part of) a byte array.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.commons.codec.IByteArrayDecoder
getDecoded, getDecoded, getMaximumDecodedLengthMethods inherited from interface com.helger.commons.codec.IByteArrayStreamDecoder
decode, getDecoded, getDecodedAsString, getDecodedAsString, getDecodedAsString, getDecodedAsString
-
Field Details
-
RUN_LENGTH_EOD
protected static final int RUN_LENGTH_EOD- See Also:
-
-
Constructor Details
-
RunLengthCodec
public RunLengthCodec()
-
-
Method Details
-
decode
public void decode(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose OutputStream aOS) Description copied from interface:IByteArrayStreamDecoderDecode (part of) a byte array.- Specified by:
decodein interfaceIByteArrayStreamDecoder- Parameters:
aEncodedBuffer- The byte array to be decoded. May benull.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 benulland is NOT closed afterwards!
-