product = null;
}
if (printPretty) {
ByteArrayOutputStream byteStream =(ByteArrayOutputStream)scriptOutput;
InputSource inputSource =
new StreamInputSource(new ByteArrayInputStream(byteStream.toByteArray()));
Writer writer = new PrintWriter(finalOutput);
PrettyPrinter prettyPrinter = new PrettyPrinter(inputSource, writer);
prettyPrinter.print();
writer.flush();