/** * Unescapes the provided byte array - this should only be called on byte * arrays that have been through the {@code escape} method. * * @param bytes the byte array to unescape * @return the unescaped byte array */ public static byte[] unEscape(final byte[] bytes) { return unEscapeByLength(bytes, 0, bytes.length); }
/** * Unescapes the provided byte array - this should only be called on byte * arrays that have been through the {@code escape} method. * * @param allBytes The backing byte array which contains the subset to unEscape * @param start The position to start the unEscape, inclusive. * @param end The position to end the unEscape, exclusive * @return the unescaped byte array */ public static byte[] unEscapeByPosition(final byte[] allBytes, final int start, final int end) { return unEscapeByLength(allBytes, start, end - start); }