本文整理了Java中org.apache.jena.atlas.io.IO.openOutputFileEx()
方法的一些代码示例,展示了IO.openOutputFileEx()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IO.openOutputFileEx()
方法的具体详情如下:
包路径:org.apache.jena.atlas.io.IO
类名称:IO
方法名:openOutputFileEx
[英]Open an input stream to a file; do not mask IOExceptions. If the filename ends in .gz, wrap in GZIPOutputStream
[中]打开文件的输入流;不要掩盖异常。如果文件名以结尾。gz,用GZIPOutputStream包装
代码示例来源:origin: apache/jena
/** 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 ; }
}
代码示例来源:origin: apache/jena
/** 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() ;
}
}
代码示例来源:origin: org.seaborne.mantis/dboe-base
/** 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() ;
}
}
代码示例来源:origin: org.apache.jena/jena-base
/** 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 ; }
}
代码示例来源:origin: org.seaborne.rdf-delta/rdf-delta-base
/** 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() ;
}
}
内容来源于网络,如有侵权,请联系作者删除!