title: How do I use a outputstream object to insert records in a database.
body: <p>I have access to a Java library that let's me pass it an OutputStream object and it writes a report to it. The reports consists of data, each column is delimited by tabs and each record is on a new row i.e. separated by newline. Currently I am passing it a fileOutput stream as below. I need to ultimately insert the data in a database. Instead of writing to a file, I wish to directly insert the data in a database. What is the best way to achieve this ?  To rephrase : I want to directly insert the data in the OutputStream to a database without having to first put it in a file. I am aiming for this with the assumption that it will improve performance. </p>
  
  <pre><code>        OutputStream report = null;
          try {
              report = new FileOutputStream( "report-" + sellerID + ".xml" );
          } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
           request.setReportOutputStream( report );
  </code></pre>