@Override public int read() throws IOException { if (_buffer != null) { int c = _buffer[_ptr++] & 0xFF; if (_ptr >= _end) { freeMergedBuffer(); } return c; } return _in.read(); }
@Override public void close() throws IOException { freeMergedBuffer(); _in.close(); }
@Override public long skip(long n) throws IOException { long count = 0L; if (_buffer != null) { int amount = _end - _ptr; if (amount > n) { // all in pushed back segment? _ptr += (int) n; return n; } freeMergedBuffer(); count += amount; n -= amount; } if (n > 0) { count += _in.skip(n); } return count; }
@Override public int read(byte[] b, int off, int len) throws IOException { if (_buffer != null) { int avail = _end - _ptr; if (len > avail) { len = avail; } System.arraycopy(_buffer, _ptr, b, off, len); _ptr += len; if (_ptr >= _end) { freeMergedBuffer(); } return len; } return _in.read(b, off, len); }
@Override public void close() throws IOException { freeMergedBuffer(); _in.close(); }
@Override public int read() throws IOException { if (_buffer != null) { int c = _buffer[_ptr++] & 0xFF; if (_ptr >= _end) { freeMergedBuffer(); } return c; } return _in.read(); }
@Override public long skip(long n) throws IOException { long count = 0L; if (_buffer != null) { int amount = _end - _ptr; if (amount > n) { // all in pushed back segment? _ptr += (int) n; return n; } freeMergedBuffer(); count += amount; n -= amount; } if (n > 0) { count += _in.skip(n); } return count; }
@Override public int read(byte[] b, int off, int len) throws IOException { if (_buffer != null) { int avail = _end - _ptr; if (len > avail) { len = avail; } System.arraycopy(_buffer, _ptr, b, off, len); _ptr += len; if (_ptr >= _end) { freeMergedBuffer(); } return len; } return _in.read(b, off, len); }
@Override public void close() throws IOException { freeMergedBuffer(); _in.close(); }
public int read() throws IOException { if (_buffer != null) { int c = _buffer[_ptr++] & 0xFF; if (_ptr >= _end) { freeMergedBuffer(); } return c; } return _in.read(); }
public void close() throws IOException { freeMergedBuffer(); _in.close(); }
@Override public int read() throws IOException { if (_buffer != null) { int c = _buffer[_ptr++] & 0xFF; if (_ptr >= _end) { freeMergedBuffer(); } return c; } return _in.read(); }
@Override public void close() throws IOException { freeMergedBuffer(); _in.close(); }
@Override public int read() throws IOException { if (_buffer != null) { int c = _buffer[_ptr++] & 0xFF; if (_ptr >= _end) { freeMergedBuffer(); } return c; } return _in.read(); }
public long skip(long n) throws IOException { long count = 0L; if (_buffer != null) { int amount = _end - _ptr; if (amount > n) { // all in pushed back segment? _ptr += (int) n; return amount; } freeMergedBuffer(); count += amount; n -= amount; } if (n > 0) { count += _in.skip(n); } return count; }
@Override public long skip(long n) throws IOException { long count = 0L; if (_buffer != null) { int amount = _end - _ptr; if (amount > n) { // all in pushed back segment? _ptr += (int) n; return n; } freeMergedBuffer(); count += amount; n -= amount; } if (n > 0) { count += _in.skip(n); } return count; }
@Override public long skip(long n) throws IOException { long count = 0L; if (_buffer != null) { int amount = _end - _ptr; if (amount > n) { // all in pushed back segment? _ptr += (int) n; return n; } freeMergedBuffer(); count += amount; n -= amount; } if (n > 0) { count += _in.skip(n); } return count; }
public int read(byte[] b, int off, int len) throws IOException { if (_buffer != null) { int avail = _end - _ptr; if (len > avail) { len = avail; } System.arraycopy(_buffer, _ptr, b, off, len); _ptr += len; if (_ptr >= _end) { freeMergedBuffer(); } return len; } return _in.read(b, off, len); }
@Override public int read(byte[] b, int off, int len) throws IOException { if (_buffer != null) { int avail = _end - _ptr; if (len > avail) { len = avail; } System.arraycopy(_buffer, _ptr, b, off, len); _ptr += len; if (_ptr >= _end) { freeMergedBuffer(); } return len; } return _in.read(b, off, len); }
@Override public int read(byte[] b, int off, int len) throws IOException { if (_buffer != null) { int avail = _end - _ptr; if (len > avail) { len = avail; } System.arraycopy(_buffer, _ptr, b, off, len); _ptr += len; if (_ptr >= _end) { freeMergedBuffer(); } return len; } return _in.read(b, off, len); }