code: public List<byte[]> split(byte sep) {
          List<byte[]> l = new LinkedList<>();
          int start = 0;
          for (int i = 0; i < bytes.length; i++) {
              if (sep == bytes[i]) {
                  byte[] b = Arrays.copyOfRange(bytes, start, i);
                  if (b.length > 0) {
                      l.add(b);
                  }
                  start = i + 1;
                  i = start;
              }
          }
          l.add(Arrays.copyOfRange(bytes, start, bytes.length));
          return l;
      }
docs: Split byte array by a separator byte.
  @param sep the separator
  @return a list of byte arrays