parquet-cli/src/main/java/org/apache/parquet/cli/BaseCommand.java
public void output(String content, Logger console, String filename)
      throws IOException {
    if (filename == null || "-".equals(filename)) {
      console.info(content);
    } else {
      FSDataOutputStream outgoing = create(filename);
      try {
        outgoing.write(content.getBytes(StandardCharsets.UTF_8));
      } finally {
        outgoing.close();
      }
    }
  }
public void output(String content, Logger console, String filename)
      throws IOException {
    if (filename == null || "-".equals(filename)) {
      console.info(content);
    } else {
      FSDataOutputStream outgoing = create(filename);
      try {
        outgoing.write(content.getBytes(StandardCharsets.UTF_8));
      } finally {
        outgoing.close();
      }
    }
  }
Output content to the console or a file.

This will not produce checksum files.

@param content String content to write
@param console A {@link Logger} for writing to the console
@param filename The destination {@link Path} as a String
@throws IOException if there is an error while writing