if (f.exists()) {
final CancelSupport cs = CancelSupport.Factory.get(sink);
final ProgressSupport progress = ProgressSupport.Factory.get(sink);
final long flength = f.length();
final int bsize = (int) Math.min(flength, 32*1024);
progress.start((int) (flength > Integer.MAX_VALUE ? flength >>> 15 /*32 kb buf size*/ : flength));
ByteBuffer buf = ByteBuffer.allocate(bsize);
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
FileChannel fc = fis.getChannel();