- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.thoughtworks.xstream.XStreamer.toXML()
方法的一些代码示例,展示了XStreamer.toXML()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XStreamer.toXML()
方法的具体详情如下:
包路径:com.thoughtworks.xstream.XStreamer
类名称:XStreamer
方法名:toXML
[英]Serialize an object including the XStream to a pretty-printed XML String.
[中]将包含XStream的对象序列化为打印精美的XML字符串。
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(final XStream xstream, final Object obj) throws ObjectStreamException {
final Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (final ObjectStreamException e) {
throw e;
} catch (final IOException e) {
throw new StreamException("Unexpected IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: x-stream/xstream
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(final XStream xstream, final Object obj) throws ObjectStreamException {
final Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (final ObjectStreamException e) {
throw e;
} catch (final IOException e) {
throw new StreamException("Unexpected IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(final XStream xstream, final Object obj) throws ObjectStreamException {
final Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (final ObjectStreamException e) {
throw e;
} catch (final IOException e) {
throw new StreamException("Unexpected IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(XStream xstream, Object obj) throws ObjectStreamException {
Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (ObjectStreamException e) {
throw e;
} catch (IOException e) {
throw new ConversionException("Unexpeced IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: org.jvnet.hudson/xstream
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(XStream xstream, Object obj) throws ObjectStreamException {
Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (ObjectStreamException e) {
throw e;
} catch (IOException e) {
throw new ConversionException("Unexpeced IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(final XStream xstream, final Object obj) throws ObjectStreamException {
final Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (final ObjectStreamException e) {
throw e;
} catch (final IOException e) {
throw new StreamException("Unexpected IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(XStream xstream, Object obj) throws ObjectStreamException {
Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (ObjectStreamException e) {
throw e;
} catch (IOException e) {
throw new ConversionException("Unexpeced IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(XStream xstream, Object obj) throws ObjectStreamException {
Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (ObjectStreamException e) {
throw e;
} catch (IOException e) {
throw new ConversionException("Unexpeced IO error from a StringWriter", e);
}
return writer.toString();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Serialize an object including the XStream to a pretty-printed XML String.
*
* @throws ObjectStreamException if the XML contains non-serializable elements
* @throws com.thoughtworks.xstream.XStreamException if the object cannot be serialized
* @since 1.2
* @see #toXML(XStream, Object, Writer)
*/
public String toXML(final XStream xstream, final Object obj) throws ObjectStreamException {
final Writer writer = new StringWriter();
try {
toXML(xstream, obj, writer);
} catch (final ObjectStreamException e) {
throw e;
} catch (final IOException e) {
throw new StreamException("Unexpected IO error from a StringWriter", e);
}
return writer.toString();
}
本文整理了Java中com.thoughtworks.xstream.XStreamer.fromXML()方法的一些代码示例,展示了XStreamer.fromXML()的具体用法。这些代码示例主要
本文整理了Java中com.thoughtworks.xstream.XStreamer.toXML()方法的一些代码示例,展示了XStreamer.toXML()的具体用法。这些代码示例主要来源于G
我是一名优秀的程序员,十分优秀!