Methods Summary |
---|
private synchronized void | bytesRead(long amountRead)Counts the given amount of bytes.
if (amountRead >= 0)
{
this.readCount += amountRead;
}
|
public synchronized long | getReadCount()
return this.readCount;
|
public synchronized void | mark(int readlimit){@inheritDoc}
super.mark(readlimit);
this.markPos = this.readCount;
|
public int | read(){@inheritDoc}
final int result = super.read();
bytesRead(1);
return result;
|
public int | read(byte[] destination, int off, int len){@inheritDoc}
final int result = super.read(destination, off, len);
bytesRead(result);
return result;
|
public synchronized void | reset(){@inheritDoc}
super.reset();
synchronized (this) {
this.readCount = this.markPos;
}
|
public long | skip(long amount){@inheritDoc}
final long skipped = super.skip(amount);
bytesRead(skipped);
return skipped;
|