Package io.kaitai.struct
Interface CustomProcessor
-
- All Superinterfaces:
CustomDecoder
public interface CustomProcessor extends CustomDecoder
A custom encoder/decoder interface. Implementing classes can be called from inside a .ksy file usingprocess: XXXsyntax.Custom processing classes which need to be used from .ksy files that will be compiled in
--read-writemode should implement this interface. For generated format libraries that are read-only (only capable of parsing, not serialization), it's enough to implementCustomDecoder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]encode(byte[] src)Encodes a given byte array, according to some custom algorithm (specific to implementing class) and parameters given in the constructor, returning another byte array.-
Methods inherited from interface io.kaitai.struct.CustomDecoder
decode
-
-
-
-
Method Detail
-
encode
byte[] encode(byte[] src)
Encodes a given byte array, according to some custom algorithm (specific to implementing class) and parameters given in the constructor, returning another byte array.This method is used in serialization. The inverse operation is
CustomDecoder.decode(byte[]), which must return the same byte array assrcwhen given the encoded byte array returned by this method.- Parameters:
src- source byte array- Returns:
- encoded byte array
-
-