/** * Sets the size increment between reporting events. Listeners * are notified if more than numbytes have been read from the * stream so far. */ public void setReportSize(int numbytes) { bytes = getByteCount(); blocks = 0; reportSize = numbytes; doit(); // recompute blocks and bytes }
/** * Resets the stream to the position at the last mark. * Listeners will get notified of the change if enough * bytes remain "read". */ public void reset() throws IOException { // un-count the bytes if rewinding occurs if (markpos >= 0 && pos > markpos) { int back = pos - markpos; bytes = getByteCount() - back; blocks = 0; doit(); } super.reset(); }