copy a file in java
===

I have an XML file looks like the following 

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <CATALOG>
      <food>
      <name>Strawberry Belgian Waffles</name>
      <price>$7.95</price>
      <description>light Belgian waffles covered with strawberries and whipped cream
      </description>
      <calories>900</calories>
      </food>
      </CATALOG>

I need to copy this file to another file using `java` programming. the following is my java code to copy the file 

   

    try{
	File f1 = new File("source.xml");
	File f2 = new File("destination.xml");
	InputStream in = new FileInputStream(f1);  
	OutputStream out = new FileOutputStream(f2);

	 byte[] buf = new byte[1024];
	 int len;
	 while ((len = in.read(buf)) > 0){
	 out.write(buf, 0, len);
	}
	 in.close();
	  out.close();
	 System.out.println("File copied.");
	 }catch(FileNotFoundException ex){
         System.out.println(ex.getMessage() + " in the specified directory.");
	 System.exit(0);
	}catch(IOException e7){
	 System.out.println(e7.getMessage());  
       }

This code does copy the file, but the problem is that is copies all the content of the source file in one single line, and I need to keep the original structure of the source file. 
Any one have a better idea to copy the file and keep its original structure? 
Thank you
