/** * Reads a byte array from the stream * @throws IOException if the underlying stream throws or the * stream is exhausted and the Checksum doesn't match the expected * value */ @Override public int read(final byte[] b) throws IOException { return read(b, 0, b.length); }
@Override public long skip(final long n) throws IOException { // Can't really skip, we have to hash everything to verify the checksum if (read() >= 0) { return 1; } return 0; }
@Override public long skip(final long n) throws IOException { // Can't really skip, we have to hash everything to verify the checksum if (read() >= 0) { return 1; } return 0; }
/** * Reads a byte array from the stream * @throws IOException if the underlying stream throws or the * stream is exhausted and the Checksum doesn't match the expected * value */ @Override public int read(final byte[] b) throws IOException { return read(b, 0, b.length); }