@Override public int read(final byte[] buffer) throws IOException { return read(buffer, 0, buffer.length); }
@Override public int read(final byte[] buffer) throws IOException { return read(buffer, 0, buffer.length); }
@Override public int read(final byte[] buffer) throws IOException { return read(buffer, 0, buffer.length); }
/** * Overridden to just skip at most a single chunk at a time */ @Override public long skip(long n) throws IOException { if (_inputStreamClosed) { return -1; } int left = (_bufferLength - _bufferPosition); // if none left, must read more: if (left <= 0) { // otherwise must read more to skip... int b = read(); if (b < 0) { // EOF return -1; } // push it back to get accurate skip count --_bufferPosition; left = (_bufferLength - _bufferPosition); } // either way, just skip whatever we have decoded if (left > n) { left = (int) n; } _bufferPosition += left; return left; } /*
/** * Overridden to just skip at most a single chunk at a time */ @Override public long skip(long n) throws IOException { if (_inputStreamClosed) { return -1; } int left = (_bufferLength - _bufferPosition); // if none left, must read more: if (left <= 0) { // otherwise must read more to skip... int b = read(); if (b < 0) { // EOF return -1; } // push it back to get accurate skip count --_bufferPosition; left = (_bufferLength - _bufferPosition); } // either way, just skip whatever we have decoded if (left > n) { left = (int) n; } _bufferPosition += left; return left; } /*
/** * Overridden to just skip at most a single chunk at a time */ @Override public long skip(long n) throws IOException { if (_inputStreamClosed) { return -1; } int left = (_bufferLength - _bufferPosition); // if none left, must read more: if (left <= 0) { // otherwise must read more to skip... int b = read(); if (b < 0) { // EOF return -1; } // push it back to get accurate skip count --_bufferPosition; left = (_bufferLength - _bufferPosition); } // either way, just skip whatever we have decoded if (left > n) { left = (int) n; } _bufferPosition += left; return left; } /*