本文整理了Java中cn.hutool.core.util.StrUtil.getReader()
方法的一些代码示例,展示了StrUtil.getReader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StrUtil.getReader()
方法的具体详情如下:
包路径:cn.hutool.core.util.StrUtil
类名称:StrUtil
方法名:getReader
[英]获得StringReader
[中]获得StringReader
代码示例来源:origin: looly/hutool
/**
* 从XML中读取对象 Reads serialized object from the XML file.
*
* @param <T> 对象类型
* @param xmlStr XML内容
* @return 对象
* @throws IOException IO异常
* @since 3.2.0
*/
public static <T> T readObjectFromXml(String xmlStr) throws IOException {
return readObjectFromXml(new InputSource(StrUtil.getReader(xmlStr)));
}
代码示例来源:origin: looly/hutool
/**
* 从XML中读取对象 Reads serialized object from the XML file.
*
* @param <T> 对象类型
* @param xmlStr XML内容
* @return 对象
* @throws IOException IO异常
* @since 3.2.0
*/
public static <T> T readObjectFromXml(String xmlStr) throws IOException {
return readObjectFromXml(new InputSource(StrUtil.getReader(xmlStr)));
}
代码示例来源:origin: looly/hutool
@Override
public Result parse(CharSequence text) {
this.seg.reset(StrUtil.getReader(text));
return new IKAnalyzerResult(this.seg);
}
代码示例来源:origin: looly/hutool
@Override
public Result parse(CharSequence text) {
this.mmSeg.reset(StrUtil.getReader(text));
return new MmsegResult(this.mmSeg);
}
代码示例来源:origin: looly/hutool
/**
* 将String类型的XML转换为XML文档
*
* @param xmlStr XML字符串
* @return XML文档
*/
public static Document parseXml(String xmlStr) {
if (StrUtil.isBlank(xmlStr)) {
throw new IllegalArgumentException("XML content string is empty !");
}
xmlStr = cleanInvalid(xmlStr);
return readXML(new InputSource(StrUtil.getReader(xmlStr)));
}
代码示例来源:origin: looly/hutool
@Override
public Result parse(CharSequence text) {
this.seg.reset(StrUtil.getReader(text));
return new IKAnalyzerResult(this.seg);
}
代码示例来源:origin: looly/hutool
@Override
public Result parse(CharSequence text) {
this.mmSeg.reset(StrUtil.getReader(text));
return new MmsegResult(this.mmSeg);
}
代码示例来源:origin: looly/hutool
/**
* 将String类型的XML转换为XML文档
*
* @param xmlStr XML字符串
* @return XML文档
*/
public static Document parseXml(String xmlStr) {
if (StrUtil.isBlank(xmlStr)) {
throw new IllegalArgumentException("XML content string is empty !");
}
xmlStr = cleanInvalid(xmlStr);
return readXML(new InputSource(StrUtil.getReader(xmlStr)));
}
代码示例来源:origin: cn.hutool/hutool-all
/**
* 从XML中读取对象 Reads serialized object from the XML file.
*
* @param <T> 对象类型
* @param xmlStr XML内容
* @return 对象
* @throws IOException IO异常
* @since 3.2.0
*/
public static <T> T readObjectFromXml(String xmlStr) throws IOException {
return readObjectFromXml(new InputSource(StrUtil.getReader(xmlStr)));
}
代码示例来源:origin: cn.hutool/hutool-all
@Override
public Result parse(CharSequence text) {
this.mmSeg.reset(StrUtil.getReader(text));
return new MmsegResult(this.mmSeg);
}
代码示例来源:origin: cn.hutool/hutool-all
/**
* 将String类型的XML转换为XML文档
*
* @param xmlStr XML字符串
* @return XML文档
*/
public static Document parseXml(String xmlStr) {
if (StrUtil.isBlank(xmlStr)) {
throw new IllegalArgumentException("XML content string is empty !");
}
xmlStr = cleanInvalid(xmlStr);
return readXML(new InputSource(StrUtil.getReader(xmlStr)));
}
代码示例来源:origin: cn.hutool/hutool-all
@Override
public Result parse(CharSequence text) {
this.seg.reset(StrUtil.getReader(text));
return new IKAnalyzerResult(this.seg);
}
内容来源于网络,如有侵权,请联系作者删除!