Hi all,
How can I change the following to allow me to also write the results to a file instead of the console.
Code:
InputStream inputStream = generalQuery.run(ReportFormat.CSV);
// Writing the output to console
byte[] buffer = new byte[1024];
int length = 0;
// Print generated report
while((length = inputStream.read(buffer)) != -1) {
System.out.write(buffer, 0, length);
}
}
catch(DartException ex) {
System.out.println(ex.getMessage());
ex.printStackTrace();
}
catch(IOException ex) {
System.out.println(ex.getMessage());
ex.printStackTrace();
}
Thanks
Thanks