/** * Like {@link #lineMap(byte[], int, int)} but throw * {@link BinaryBlobException} if a NUL byte is encountered. * * @param buf * buffer to scan. * @param ptr * position within the buffer corresponding to the first byte of * line 1. * @param end * 1 past the end of the content within <code>buf</code>. * @return a line map indicating the starting position of each line. * @throws BinaryBlobException * if a NUL byte is found. * @since 5.0 */ public static final IntList lineMapOrBinary(byte[] buf, int ptr, int end) throws BinaryBlobException { IntList map = lineMapOrNull(buf, ptr, end); if (map == null) { throw new BinaryBlobException(); } return map; }
throw new BinaryBlobException(); byte[] data = ldr.getCachedBytes(FIRST_FEW_BYTES); if (isBinary(data)) { throw new BinaryBlobException(); throw new BinaryBlobException();
/** * Like {@link #lineMap(byte[], int, int)} but throw * {@link BinaryBlobException} if a NUL byte is encountered. * * @param buf * buffer to scan. * @param ptr * position within the buffer corresponding to the first byte of * line 1. * @param end * 1 past the end of the content within <code>buf</code>. * @return a line map indicating the starting position of each line. * @throws BinaryBlobException * if a NUL byte is found. * @since 5.0 */ public static final IntList lineMapOrBinary(byte[] buf, int ptr, int end) throws BinaryBlobException { IntList map = lineMapOrNull(buf, ptr, end); if (map == null) { throw new BinaryBlobException(); } return map; }
throw new BinaryBlobException(); byte[] data = ldr.getCachedBytes(FIRST_FEW_BYTES); if (isBinary(data)) { throw new BinaryBlobException(); throw new BinaryBlobException();