Moreover, it looks like transferTo(0, 4096, ...) would write
4096 bytes to destination file from file with size 1701.

It can be shown by this snippet:

-----------------------------------------
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.channels.FileChannel;

public class Tra {

  public static void main(String[] args) throws Exception {
    if (args.length != 2) {
      System.out.println("arguments: sourcefile destfile");
      System.exit(1);
    }
    FileChannel in = new FileInputStream(args[0]).getChannel(),
               out = new FileOutputStream(args[1]).getChannel();

    in.transferTo(0, 4096, out);
  }
}
---------------------------------------------



Petr



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to