title: save the sql output in text file
body: <p><img src="https://i.stack.imgur.com/lt7f0.png" alt="SQL required output"></p>
  
  <p>i need some buildit method of any class that can give output me like described in below figure 
  (in xyz.txt) file . i tried by using my own user define method when i pass the ResultSet object to it. It will going to save all record in txt file using FileWriter but some time order changed or even columns not fit in area etc. so i need java buildit method like <code>SQL Command line Client</code> which give output like below then definately there is java method available for save the output in txt file</p>
  
  <p>in need like this method public void convert(ResultSet rs,String fileoutputname){}
  and if rs="select * from employees" output save in fileoutput.txt</p>