Class ByteUtils


  • public class ByteUtils
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteUtils()  
    • Constructor Detail

      • ByteUtils

        public ByteUtils()
    • Method Detail

      • escape

        public static byte[] escape​(byte[] in)
        Escapes 0x00 with 0x01 0x01 and 0x01 with 0x01 0x02
      • unescape

        public static byte[] unescape​(byte[] in)
        Unescapes 0x00 0x01 0x01 with 0x00 and 0x01 0x01 0x2 with 0x01
      • split

        public static byte[][] split​(byte[] data)
        Splits a byte array by 0x00
      • split

        public static byte[][] split​(byte[] data,
                                     int dataOffset,
                                     int len)
        Splits a byte array by 0x00
      • concat

        public static byte[] concat​(byte[]... fields)
        Concatenates byte arrays with 0x00 as a delimiter