/** Open a file for output - may include adding gzip processing. */ static public OutputStream openOutputFile(String filename) { try { return openOutputFileEx(filename) ; } catch (IOException ex) { IO.exception(ex) ; return null ; } }
/** Write a string to a file as UTF-8. The file is closed after the operation. * @param filename * @param content String to be written * @throws IOException */ public static void writeStringAsUTF8(String filename, String content) throws IOException { try ( OutputStream out = IO.openOutputFileEx(filename) ) { writeStringAsUTF8(out, content) ; out.flush() ; } }
/** Write a string to a file as UTF-8. The file is closed after the operation. * @param filename * @param content String to be writtem * @throws IOException */ public static void writeStringAsUTF8(String filename, String content) throws IOException { try ( OutputStream out = IO.openOutputFileEx(filename) ) { writeStringAsUTF8(out, content) ; out.flush() ; } }
/** Open a file for output - may include adding gzip processing. */ static public OutputStream openOutputFile(String filename) { try { return openOutputFileEx(filename) ; } catch (IOException ex) { IO.exception(ex) ; return null ; } }
/** Write a string to a file as UTF-8. The file is closed after the operation. * @param filename * @param content String to be writtem * @throws IOException */ private /*public*/ static void writeStringAsUTF8(String filename, String content) throws IOException { try ( OutputStream out = IO.openOutputFileEx(filename) ) { writeStringAsUTF8(out, content) ; out.flush() ; } }