List of utility methods to do Byte Array Cut
byte[] | cutBytes(byte[] bytes, int pos, int length) cut Bytes if (length < 0) { return null; byte[] dest = new byte[length]; System.arraycopy(bytes, pos, dest, 0, length); return dest; |
void | deleteSpace(byte[] b) delete Space int len = b.length; if ((len & 1) == 1) { b[len - 1] = '\0'; len--; int count = 0; for (int i = 0; i < len; i += 2) { int high = b[i] & 0xff; ... |
void | deleteMark(byte[] b) delete Mark int len = b.length; if ((len & 1) == 1) { b[len - 1] = '\0'; len--; int count = 0; for (int i = 0; i < len; i += 2) { int high = b[i] & 0xff; ... |
void | deleteSpaceLatin(byte[] b) delete Space Latin int count = 0; int len = b.length; for (int i = 0; i < len; i++) { int ch = b[i] & 0xff; if (ch == '\0') { count = count + len - i; break; } else if (ch == 0x20) { ... |
byte[] | remove(byte[] data, int place) remove int len = data.length; byte[] result = new byte[(len - 1)]; for (int i = 0, j = 0; i < len; i++, j++) { if (i == place) { i++; if (i >= len) { break; ... |