Class BitmappedCodec<T extends Bitmapped>

java.lang.Object
io.bytestreams.codec.iso8583.BitmappedCodec<T>
Type Parameters:
T - the bitmapped message type
All Implemented Interfaces:
io.bytestreams.codec.core.Codec<T>, io.bytestreams.codec.core.Inspectable<T>

public class BitmappedCodec<T extends Bitmapped> extends Object implements io.bytestreams.codec.core.Codec<T>, io.bytestreams.codec.core.Inspectable<T>
A codec for bitmap-driven messages that supports field introspection.

Wraps a SequentialObjectCodec and implements Inspectable to produce structured representations of decoded messages.

  • Method Details

    • encode

      public io.bytestreams.codec.core.EncodeResult encode(T value, OutputStream output) throws IOException
      Specified by:
      encode in interface io.bytestreams.codec.core.Codec<T extends Bitmapped>
      Throws:
      IOException
    • decode

      public T decode(InputStream input) throws IOException
      Specified by:
      decode in interface io.bytestreams.codec.core.Codec<T extends Bitmapped>
      Throws:
      IOException
    • inspect

      public Object inspect(T message)
      Specified by:
      inspect in interface io.bytestreams.codec.core.Inspectable<T extends Bitmapped>
    • fieldSpecs

      public Map<Integer,io.bytestreams.codec.core.FieldSpec<T,?>> fieldSpecs()
      Returns the registered field specs keyed by bit index.
      Returns:
      an unmodifiable map of bit index to field spec