@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }
@Override public int read() throws IOException { if (bb == null) { throw new IOException("read on a closed InputStream"); } if (remainingBytes() == 0) { return -1; } else { return bb.readByte() & 0xFF; } }
@Override public int read(final byte[] byteArray, final int off, final int len) throws IOException { if (bb == null) { throw new IOException("read on a closed InputStream"); } if (byteArray == null) { throw new NullPointerException(); } if (off < 0 || off > byteArray.length || len < 0 || off + len > byteArray.length || off + len < 0) { throw new IndexOutOfBoundsException(); } if (len == 0) { return 0; } int size = Math.min(remainingBytes(), len); if (size == 0) { return -1; } bb.readBytes(byteArray, off, size); return size; }
@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public int available() throws IOException { if (bb == null) { throw new IOException("available on a closed InputStream"); } return remainingBytes(); }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }
@Override public int read() throws IOException { if (bb == null) { throw new IOException("read on a closed InputStream"); } if (remainingBytes() == 0) { return -1; } else { return bb.readByte() & 0xFF; } }
@Override public int read() throws IOException { if (bb == null) { throw new IOException("read on a closed InputStream"); } if (remainingBytes() == 0) { return -1; } else { return bb.readByte() & 0xFF; } }
@Override public int read() throws IOException { if (bb == null) { throw new IOException("read on a closed InputStream"); } if (remainingBytes() == 0) { return -1; } else { return bb.readByte() & 0xFF; } }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }
@Override public int read() throws IOException { if (bb == null) { throw new IOException("read on a closed InputStream"); } if (remainingBytes() == 0) { return -1; } else { return bb.readByte() & 0xFF; } }
@Override public long skip(final long len) throws IOException { if (bb == null) { throw new IOException("skip on a closed InputStream"); } if (len <= 0L) { return 0L; } int size = Math.min(remainingBytes(), (int) len); bb.skipBytes(size); return size; }