title: Will reading/writing an int value from/to a file using byte-oriented stream such as FileInputStream/FileOutputStream access the buffer/disk 4 times?
body: <p>Sample Code is :-</p>
  
  <pre><code>import java.io.*;
  
  public class WriteInt{
      public static void main(String [] args)
      {
      WriteInt obj = new WriteInt();
      obj.write();
      }
  
      public void write(){
      File file = null;
      FileOutputStream out = null;
      int [] arr = {6};
      try{
      file= new File("CheckSize.txt");
      out = new FileOutputStream(file);
      for(int i =0; i&lt;arr.length;i++)
      {
          System.out.println("Trying to write to file:-"+ file);
          out.write(arr[i]);
      }
  
      }
      catch(IOException ioex){
      ioex.printStackTrace();
      } 
      finally{
      if(out != null)
      {
          System.out.println("Closing the stream");
          try{
          out.close();
          }   
          catch(IOException ioex){
          ioex.printStackTrace();
          }
      }
  
      else{
          System.out.println("Stream not open");
          }   
      }
      }
  
      }
  </code></pre>
  
  <p>Since I am using Byte-Oriented Stream to write data to a file; My Question is that will the data be written to file in 4 steps (1 byte) in each step. Considering <code>int</code> to be of 4 bytes. Please correct me if I am wrong.</p>