@Override public int available() throws IOException { checkStream(); return (eof) ? 0 : 1; }
protected int getCompressedData() throws IOException { checkStream(); // note that the _caller_ is now required to call setInput() or throw return in.read(buffer, 0, buffer.length); }
@Override public int read() throws IOException { checkStream(); return (read(oneByte, 0, oneByte.length) == -1) ? -1 : (oneByte[0] & 0xff); }
@Override public int read(byte[] b, int off, int len) throws IOException { checkStream(); if ((off | len | (off + len) | (b.length - (off + len))) < 0) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return 0; } return decompress(b, off, len); }
@Override public long skip(long n) throws IOException { // Sanity checks if (n < 0) { throw new IllegalArgumentException("negative skip length"); } checkStream(); // Read 'n' bytes int skipped = 0; while (skipped < n) { int len = Math.min(((int)n - skipped), skipBytes.length); len = read(skipBytes, 0, len); if (len == -1) { eof = true; break; } skipped += len; } return skipped; }
@Override public int available() throws IOException { checkStream(); return (eof) ? 0 : 1; }
public int available() throws IOException { checkStream(); return (eof) ? 0 : 1; }
@Override public int available() throws IOException { checkStream(); return (eof) ? 0 : 1; }
@Override public int available() throws IOException { checkStream(); return (eof) ? 0 : 1; }
protected int getCompressedData() throws IOException { checkStream(); // note that the _caller_ is now required to call setInput() or throw return in.read(buffer, 0, buffer.length); }
protected int getCompressedData() throws IOException { checkStream(); // note that the _caller_ is now required to call setInput() or throw return in.read(buffer, 0, buffer.length); }
protected int getCompressedData() throws IOException { checkStream(); // note that the _caller_ is now required to call setInput() or throw return in.read(buffer, 0, buffer.length); }
void getCompressedData() throws IOException { checkStream(); int n = in.read(buffer, 0, buffer.length); if (n == -1) { throw new EOFException("Unexpected end of input stream"); } decompressor.setInput(buffer, 0, n); }
@Override public int read() throws IOException { checkStream(); return (read(oneByte, 0, oneByte.length) == -1) ? -1 : (oneByte[0] & 0xff); }
@Override public int read(byte[] b, int off, int len) throws IOException { checkStream(); if ((off | len | (off + len) | (b.length - (off + len))) < 0) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return 0; } return decompress(b, off, len); }
public int read(byte[] b, int off, int len) throws IOException { checkStream(); if ((off | len | (off + len) | (b.length - (off + len))) < 0) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return 0; } return decompress(b, off, len); }
@Override public int read() throws IOException { checkStream(); return (read(oneByte, 0, oneByte.length) == -1) ? -1 : (oneByte[0] & 0xff); }
@Override public int read(byte[] b, int off, int len) throws IOException { checkStream(); if ((off | len | (off + len) | (b.length - (off + len))) < 0) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return 0; } return decompress(b, off, len); }
@Override public int read() throws IOException { checkStream(); return (read(oneByte, 0, oneByte.length) == -1) ? -1 : (oneByte[0] & 0xff); }
@Override public int read() throws IOException { checkStream(); return (read(oneByte, 0, oneByte.length) == -1) ? -1 : (oneByte[0] & 0xff); }