/** * updates listener when required */ public int read() throws IOException { //by doing this before we're out by one byte... this might be bad... if ((bytesRead % interval) == 0) { listener.setStreamProgress(bytesRead); } return super.read(); }
/** * updates listener when required */ public int read() throws IOException { //by doing this before we're out by one byte... this might be bad... if ((bytesRead % interval) == 0) { listener.setStreamProgress(bytesRead); } return super.read(); }
/** * increments bytesWritten and writes byte to wrapped out */ public void write(int b) throws IOException { super.write(b); if ((bytesWritten % interval) == 0) { listener.setStreamProgress(bytesWritten); } }
/** * increments bytesWritten and writes byte to wrapped out */ public void write(int b) throws IOException { super.write(b); if ((bytesWritten % interval) == 0) { listener.setStreamProgress(bytesWritten); } }