Class TerminatedByteArrayTool

java.lang.Object
io.datarouter.bytes.TerminatedByteArrayTool

public class TerminatedByteArrayTool extends Object
Terminated arrays can be embedded in a bigger array knowing that 0 is the terminal character. We escape away the 0 bytes inside the array. Two escaped arrays will compare equivalently to two unescaped arrays. To escape: - replace 0 with 1,2. - replace 1 with 1,3. - append 0 at the end.