Merging two files

Hi,

I have two files say A and B

I want to append the contents of A to the end of File B...

For eg File A contains

1

2

3

4

For eg File B contains

5

6

7

8

-

OutPut should be File B should look like the following

5

6

7

8

1

2

3

4

-

Is the any optimised code in JAVA or any JAVA class to do this merging of files?

Thanks & regards

Neel

[499 byte] By [neela] at [2007-11-27 4:04:25]
# 1
filereader on Afilewriter on Bread A, write the content into B ; and you re done :)
calvino_inda at 2007-7-12 9:09:17 > top of Java-index,Java Essentials,Java Programming...
# 2
Process p = new ProcessBuilder("merge", "[-AeEpqxX3] [-L lab [-L lab [-L lab]]] file1 file2 file3").start(); // under unix
suparenoa at 2007-7-12 9:09:17 > top of Java-index,Java Essentials,Java Programming...