title: Unable to write large String to a file
body: <p>I am trying to print a large string(single line) into a file. But the string is getting truncated in between. Any idea on why this is happening?</p>
  
  <pre><code>void writeToFile(String schemaString,String message){
  
      try{
          FileWriter fw = new FileWriter("D:\\Servicelog.txt", true);                     
          java.util.Date date= new java.util.Date();
          fw.write(new Timestamp(date.getTime())+"\n");
          fw.write(message+"\n");         
          fw.write("schemaBegins\n"+schemaString+"\n"+"schemaEnds");
      }catch(Exception e){
          e.printStackTrace();
      }   
  
  }
  </code></pre>