My program is a file manager and I want to pause a channel to channel copy file when I click on pause button. my copy method
fcin = new FileInputStream(source.getPath().replace("\\", "/")).getChannel();
fcout = new FileOutputStream(dest.getPath().replace("\\", "/")).getChannel();
processValue value = new processValue(bar, source, dest);
Thread t1 = new Thread(value);
t1.start();
this.setVisible(true);
fcin.transferTo(0, fcin.size(), fcout);
retVal = true;
and t1 is for a JProgressBar for this process. Can you help me??