private int readOneByte() throws IOException { final int b = in.read(); if (b != -1) { count(1); return b & 0xFF; } return -1; }
private long readCrc() throws IOException { final byte[] b = new byte[4]; final int read = IOUtils.readFully(in, b); count(read); if (read != 4) { throw new IOException("premature end of stream"); } return ByteUtils.fromLittleEndian(b); }
private void readStreamIdentifier() throws IOException { final byte[] b = new byte[10]; final int read = IOUtils.readFully(in, b); count(read); if (10 != read || !matches(b, 10)) { throw new IOException("Not a framed Snappy stream"); } }
private void skipBlock() throws IOException { final int size = readSize(); final long read = IOUtils.skip(in, size); count(read); if (read != size) { throw new IOException("premature end of stream"); } }
new SnappyCompressorInputStream(new BoundedInputStream(in, size), blockSize); count(currentCompressedChunk.getBytesRead()); } else {
private int readOneByte() throws IOException { final int b = in.read(); if (b != -1) { count(1); return b & 0xFF; } return -1; }
private void readStreamIdentifier() throws IOException { final byte[] b = new byte[10]; final int read = IOUtils.readFully(in, b); count(read); if (10 != read || !matches(b, 10)) { throw new IOException("Not a framed Snappy stream"); } }
private long readCrc() throws IOException { final byte[] b = new byte[4]; final int read = IOUtils.readFully(in, b); count(read); if (read != 4) { throw new IOException("premature end of stream"); } return ByteUtils.fromLittleEndian(b); }
private void skipBlock() throws IOException { final int size = readSize(); final long read = IOUtils.skip(in, size); count(read); if (read != size) { throw new IOException("premature end of stream"); } }
new SnappyCompressorInputStream(new BoundedInputStream(in, size), blockSize); count(currentCompressedChunk.getBytesRead()); } else {