private static PrintStream openStream(File out) throws IOException {
    OutputStream os = new FileOutputStream(out);
    os = out.getName().endsWith(GZIP_POSTFIX) ? new GZIPOutputStream(os) : os;
    return new PrintStream(os);
  }
private static PrintStream openStream ( File out ) throws IOException { OutputStream os = new FileOutputStream ( out ) ; os = out . getName ( ) . endsWith ( GZIP_POSTFIX ) ? new GZIPOutputStream ( os ) : os ; return new PrintStream ( os ) ; }
Open the output stream, using gzip if necessary.

@param out Output file name.
@return Output stream
@throws IOException