Guys can you help me with the following detail. Why does the following example work. I dont get my head around the following line: " int data =; " get the bytes of the file c:/data.txt concetinated automatically in the vaiable data or does read the file c:/data.txt all at once? best regards Fabian
public static void main(String[] args) throws Exception
 //Create a stream to read bytes from a file
 FileInputStream inputStream = new FileInputStream("c:/data.txt");
 //Create a stream to write bytes to a file
 FileOutputStream outputStream = new FileOutputStream("c:/result.txt");

 while (inputStream.available() > 0) //as long as there are unread bytes
  int data =; // Read the next byte into the data variable
  outputStream.write(data); // and write it to the second stream
 inputStream.close(); //Close both streams. We don't need them any more.