本文整理了Java中com.thoughtworks.xstream.io.xml.xppdom.XppDom.build()
方法的一些代码示例,展示了XppDom.build()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XppDom.build()
方法的具体详情如下:
包路径:com.thoughtworks.xstream.io.xml.xppdom.XppDom
类名称:XppDom
方法名:build
[英]Build an XPP DOM hierarchy. The java.io.InputStream or java.io.Readerused by the parser must have already been set. The method does not close it after reading the document's end.
[中]构建一个XPP DOM层次结构。爪哇。伊奥。InputStream或java。伊奥。解析器使用的reader必须已设置。该方法在读取文档结尾后不会将其关闭。
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
public static Xpp3Dom build(Reader reader) throws Exception {
XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* {@inheritDoc}
*/
public HierarchicalStreamReader createReader(Reader in) {
try {
XmlPullParser parser = createParser();
parser.setInput(in);
return new XppDomReader(XppDom.build(parser), getNameCoder());
} catch (XmlPullParserException e) {
throw new StreamException(e);
} catch (IOException e) {
throw new StreamException(e);
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
public static Xpp3Dom build(Reader reader) throws Exception {
XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
public static Xpp3Dom build(Reader reader) throws Exception {
XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
public static Xpp3Dom build(Reader reader) throws Exception {
XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
public static Xpp3Dom build(Reader reader) throws Exception {
XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
public static Xpp3Dom build(Reader reader) throws Exception {
XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: x-stream/xstream
/**
* @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
*/
@Deprecated
public static Xpp3Dom build(final Reader reader) throws Exception {
final XmlPullParser parser = new MXParser();
parser.setInput(reader);
try {
return (Xpp3Dom)XppDom.build(parser);
} finally {
reader.close();
}
}
}
代码示例来源:origin: x-stream/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Build an XPP DOM hierarchy from an InputStream.
*
* @param in the input stream
* @param encoding the encoding of the input stream
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(in, encoding);
return XppDom.build(parser);
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Build an XPP DOM hierarchy from a Reader.
*
* @param r the reader
* @throws XmlPullParserException if the default parser cannot be created or fails with invalid XML
* @throws IOException if the data cannot be read
* @see XppDom#build(XmlPullParser)
* @since 1.4.1
*/
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException {
XmlPullParser parser = createDefaultParser();
parser.setInput(r);
return XppDom.build(parser);
}
代码示例来源:origin: x-stream/xstream
@Override
public HierarchicalStreamReader createReader(final Reader in) {
try {
final XmlPullParser parser = createParser();
parser.setInput(in);
return new XppDomReader(XppDom.build(parser), getNameCoder());
} catch (final XmlPullParserException e) {
throw new StreamException(e);
} catch (final IOException e) {
throw new StreamException(e);
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* {@inheritDoc}
*/
public HierarchicalStreamReader createReader(Reader in) {
try {
XmlPullParser parser = createParser();
parser.setInput(in);
return new XppDomReader(XppDom.build(parser), getNameCoder());
} catch (XmlPullParserException e) {
throw new StreamException(e);
} catch (IOException e) {
throw new StreamException(e);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* {@inheritDoc}
*/
public HierarchicalStreamReader createReader(Reader in) {
try {
XmlPullParser parser = createParser();
parser.setInput(in);
return new XppDomReader(XppDom.build(parser), getNameCoder());
} catch (XmlPullParserException e) {
throw new StreamException(e);
} catch (IOException e) {
throw new StreamException(e);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* {@inheritDoc}
*/
public HierarchicalStreamReader createReader(Reader in) {
try {
XmlPullParser parser = createParser();
parser.setInput(in);
return new XppDomReader(XppDom.build(parser), getNameCoder());
} catch (XmlPullParserException e) {
throw new StreamException(e);
} catch (IOException e) {
throw new StreamException(e);
}
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* {@inheritDoc}
*/
public HierarchicalStreamReader createReader(Reader in) {
try {
XmlPullParser parser = createParser();
parser.setInput(in);
return new XppDomReader(XppDom.build(parser), getNameCoder());
} catch (XmlPullParserException e) {
throw new StreamException(e);
} catch (IOException e) {
throw new StreamException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!