当前位置: 首页>>代码示例>>Java>>正文


Java DataUtil.load方法代码示例

本文整理汇总了Java中org.jsoup.helper.DataUtil.load方法的典型用法代码示例。如果您正苦于以下问题:Java DataUtil.load方法的具体用法?Java DataUtil.load怎么用?Java DataUtil.load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jsoup.helper.DataUtil的用法示例。


在下文中一共展示了DataUtil.load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: charsetName

import org.jsoup.helper.DataUtil; //导入方法依赖的package包/类
/**
 Parse the contents of a file as HTML.

 @param in          file to load HTML from
 @param charsetName (optional) character set of file contents. Set to {@code null} to determine from {@code http-equiv} meta tag, if
 present, or fall back to {@code UTF-8} (which is often safe to do).
 @param baseUri     The URL where the HTML was retrieved from, to resolve relative links against.
 @return sane HTML

 @throws IOException if the file could not be found, or read, or if the charsetName is invalid.
 */
public static Document parse(File in, String charsetName, String baseUri) throws IOException {
    return DataUtil.load(in, charsetName, baseUri);
}
 
开发者ID:cpusoft,项目名称:common,代码行数:15,代码来源:Jsoup.java

示例2: charsetName

import org.jsoup.helper.DataUtil; //导入方法依赖的package包/类
/**
 Read an input stream, and parse it to a Document.

 @param in          input stream to read. Make sure to close it after parsing.
 @param charsetName (optional) character set of file contents. Set to {@code null} to determine from {@code http-equiv} meta tag, if
 present, or fall back to {@code UTF-8} (which is often safe to do).
 @param baseUri     The URL where the HTML was retrieved from, to resolve relative links against.
 @return sane HTML

 @throws IOException if the file could not be found, or read, or if the charsetName is invalid.
 */
public static Document parse(InputStream in, String charsetName, String baseUri) throws IOException {
    return DataUtil.load(in, charsetName, baseUri);
}
 
开发者ID:gumulka,项目名称:JabRefAutocomplete,代码行数:15,代码来源:Jsoup.java

示例3: charsetName

import org.jsoup.helper.DataUtil; //导入方法依赖的package包/类
/**
 Parse the contents of a file as HTML. The location of the file is used as the base URI to qualify relative URLs.

 @param in          file to load HTML from
 @param charsetName (optional) character set of file contents. Set to {@code null} to determine from {@code http-equiv} meta tag, if
 present, or fall back to {@code UTF-8} (which is often safe to do).
 @return sane HTML

 @throws IOException if the file could not be found, or read, or if the charsetName is invalid.
 @see #parse(File, String, String)
 */
public static Document parse(File in, String charsetName) throws IOException {
    return DataUtil.load(in, charsetName, in.getAbsolutePath());
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:15,代码来源:Jsoup.java


注:本文中的org.jsoup.helper.DataUtil.load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。