Package io.bytestreams.codec.iso8583
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 Summary
Modifier and TypeMethodDescriptiondecode(InputStream input) io.bytestreams.codec.core.EncodeResultencode(T value, OutputStream output) Returns the registered field specs keyed by bit index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.bytestreams.codec.core.Codec
xmap, xmap
-
Method Details
-
encode
public io.bytestreams.codec.core.EncodeResult encode(T value, OutputStream output) throws IOException - Specified by:
encodein interfaceio.bytestreams.codec.core.Codec<T extends Bitmapped>- Throws:
IOException
-
decode
- Specified by:
decodein interfaceio.bytestreams.codec.core.Codec<T extends Bitmapped>- Throws:
IOException
-
inspect
-
fieldSpecs
Returns the registered field specs keyed by bit index.- Returns:
- an unmodifiable map of bit index to field spec
-