It is not possible to merge two files without reading all the contents (of at lest one of them) and writing it into another file. Filesystems don't support that operation. If you need to merge two files you read them one by one (not necessary a line at a time, but all the contents) and write it into another single file.
Edit Example:
BufferedReader br(in);
String line;
while ((line = br.readLine()) != null) {
// write it out
}