title: How to Write Data (String) to Text File
body: <p>I currently have the lines of code:</p>
  
  <pre><code>ResultSet RS = cs.executeQuery();
  ....
  FileOutputStream outFile = new FileOutputStream(file, false);
  while(RS.next()) {
      outFile.write(RS.getString(1));
  }
  </code></pre>
  
  <p><strong>There is only one column in the resultset.</strong> I'm getting an error that RS.getString(1) must be an int. </p>