本文整理了Java中org.apache.jena.util.FileUtils.asUTF8()
方法的一些代码示例,展示了FileUtils.asUTF8()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.asUTF8()
方法的具体详情如下:
包路径:org.apache.jena.util.FileUtils
类名称:FileUtils
方法名:asUTF8
[英]Create a reader that uses UTF-8 encoding
[中]创建使用UTF-8编码的读取器
代码示例来源:origin: org.apache.jena/jena-core
/** Create a buffered reader that uses UTF-8 encoding */
static public BufferedReader asBufferedUTF8(InputStream in)
{
BufferedReader r = new BufferedReader(asUTF8(in)) ;
return r ;
}
代码示例来源:origin: apache/jena
/** Create a print writer that uses UTF-8 encoding */
static public PrintWriter asPrintWriterUTF8(OutputStream out) {
return new PrintWriter(asUTF8(out));
}
代码示例来源:origin: apache/jena
/** Create a buffered reader that uses UTF-8 encoding */
static public BufferedReader asBufferedUTF8(InputStream in)
{
BufferedReader r = new BufferedReader(asUTF8(in)) ;
return r ;
}
代码示例来源:origin: org.apache.jena/jena-core
/** Create a print writer that uses UTF-8 encoding */
static public PrintWriter asPrintWriterUTF8(OutputStream out) {
return new PrintWriter(asUTF8(out));
}
代码示例来源:origin: apache/jena
@Override
public void read(Model model, InputStream in, String base)
{
// N-Triples must be in ASCII, we permit UTF-8.
read(model, FileUtils.asUTF8(in), base);
}
@Override
代码示例来源:origin: org.apache.jena/jena-core
/** Write out an XML serialization of a model.
* @param model the model to be serialized
* @param out the OutputStream to receive the serialization
* @param base The URL at which the file will be placed.
*/
@Override
final public void write(Model model, OutputStream out, String base)
{ write( model, FileUtils.asUTF8(out), base ); }
代码示例来源:origin: org.apache.jena/jena-core
@Override
public void read(Model model, InputStream in, String base)
{
// N-Triples must be in ASCII, we permit UTF-8.
read(model, FileUtils.asUTF8(in), base);
}
@Override
代码示例来源:origin: apache/jena
public void parse(Graph graph, String baseURI, InputStream in)
{
Reader reader = FileUtils.asUTF8(in) ;
parse(graph, baseURI, reader) ;
}
代码示例来源:origin: apache/jena
/** Write out an XML serialization of a model.
* @param model the model to be serialized
* @param out the OutputStream to receive the serialization
* @param base The URL at which the file will be placed.
*/
@Override
final public void write(Model model, OutputStream out, String base)
{ write( model, FileUtils.asUTF8(out), base ); }
代码示例来源:origin: org.apache.jena/jena-core
public void parse(Graph graph, String baseURI, InputStream in)
{
Reader reader = FileUtils.asUTF8(in) ;
parse(graph, baseURI, reader) ;
}
代码示例来源:origin: apache/jena
static protected BufferedReader makeReader(InputStream in)
{
return new BufferedReader(FileUtils.asUTF8(in)) ;
}
}
代码示例来源:origin: org.apache.jena/jena-core
static protected BufferedReader makeReader(InputStream in)
{
return new BufferedReader(FileUtils.asUTF8(in)) ;
}
}
代码示例来源:origin: apache/jena
@Override
public void write(Model model, OutputStream out, String base)
{
try {
Writer w;
try {
w = new OutputStreamWriter(out, "ascii");
} catch (UnsupportedEncodingException e) {
logger.warn( "ASCII is not supported: in NTripleWriter.write", e );
w = FileUtils.asUTF8(out);
}
write(model, w, base);
w.flush();
} catch (Exception ioe) {
errorHandler.error(ioe);
}
}
@Override
代码示例来源:origin: org.apache.jena/jena-core
@Override
public void write(Model model, OutputStream out, String base)
{
try {
Writer w;
try {
w = new OutputStreamWriter(out, "ascii");
} catch (UnsupportedEncodingException e) {
logger.warn( "ASCII is not supported: in NTripleWriter.write", e );
w = FileUtils.asUTF8(out);
}
write(model, w, base);
w.flush();
} catch (Exception ioe) {
errorHandler.error(ioe);
}
}
@Override
代码示例来源:origin: apache/jena
Writer w = FileUtils.asUTF8(out) ;
NodeToLabelMap bnodes = new NodeToLabelMap() ;
w = new BufferedWriter(w) ;
内容来源于网络,如有侵权,请联系作者删除!