/** * Creates a new CounterOutputStream using the specified OutputStream. A new {@link ByteCounter} will be created. * * @param out the underlying OutputStream the data will be written to */ public CounterOutputStream(OutputStream out) { this.out = out; this.counter = new ByteCounter(); }
/** * Creates a new CounterInputStream using the specified InputStream. A new {@link ByteCounter} will be created. * * @param in the underlying InputStream the data will be read from */ public CounterInputStream(InputStream in) { this.in = in; this.counter = new ByteCounter(); }
/** * Creates a new TransferFileJob. */ public TransferFileJob(ProgressDialog progressDialog, MainFrame mainFrame, FileSet files) { super(progressDialog, mainFrame, files); this.currentFileByteCounter = new ByteCounter(); this.currentFileSkippedByteCounter = new ByteCounter(); // Account the current file's byte counter in the total byte counter this.totalByteCounter = new ByteCounter(currentFileByteCounter); this.totalSkippedByteCounter = new ByteCounter(currentFileSkippedByteCounter); }