Here you can find the source of deleteMark(byte[] b)
public static void deleteMark(byte[] b)
//package com.java2s; public class Main { public static void deleteMark(byte[] b) { int len = b.length; if ((len & 1) == 1) { b[len - 1] = '\0'; len--;//from w w w .jav a 2 s .com } int count = 0; for (int i = 0; i < len; i += 2) { int high = b[i] & 0xff; int low = b[i + 1] & 0xff; if (high == '\0' || low == '\0') { count = count + len - i; break; } else if (high == 0x21 && (low == 0x26 || low == 0x3e || low == 0x47 || low == 0x5d)) { count += 2; } else { b[i - count] = (byte) high; b[i - count + 1] = (byte) low; } } if (count > 0) { int size = b.length; for (int i = len - count; i < size; i++) { b[i] = '\0'; } } } }