hi to all...
Plz i wnt a valuable code to append two text files in java i tried alot using WriteBuffered and FileOutputStream(file,true) but without any use i wrote the following code:
import java.io.*;
public class append{
public static void main(String[] args) throws IOException {
FileInputStream Message_File=new FileInputStream ("C:/JBuilder4/lib/input6.txt");
BufferedReader buff=new BufferedReader(new InputStreamReader(Message_File));
String Input_Message=new String();
System.out.println("Your input message is as following:");
int c;
while ((c = buff.read()) != -1){
FileOutputStream out = new FileOutputStream("C:/JBuilder4/lib/output6.txt", true);
buff.close();
out.close();
}}
}
it gives no errors but it doesnt append the two files plzz any good code to do so??