@Override public synchronized long skip(long n) throws IOException { try { long skipped = super.skip(n); if (skipped > 0) { bytesRead += skipped; } return skipped; } catch (Exception e) { return onException(e); } }
/** * {@inheritDoc} */ @Override public int read() throws IOException { try { int value = super.read(); eofReached = value == -1; if (!eofReached) { bytesRead++; } return value; } catch (Exception e) { return onException(e); } }
/** * {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { try { int value = super.read(b, off, len); eofReached = value == -1; if (!eofReached) { bytesRead += value; } return value; } catch (Exception e) { return onException(e); } }
@Override public synchronized long skip(long n) throws IOException { try { long skipped = super.skip(n); if (skipped > 0) { bytesRead += skipped; } return skipped; } catch (Exception e) { return onException(e); } }
/** * {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { try { int value = super.read(b, off, len); eofReached = value == -1; if (!eofReached) { bytesRead += value; } return value; } catch (Exception e) { return onException(e); } }
/** * {@inheritDoc} */ @Override public int read() throws IOException { try { int value = super.read(); eofReached = value == -1; if (!eofReached) { bytesRead++; } return value; } catch (Exception e) { return onException(e); } }