/**
* Writes an object to XML.
*
* @param out The boject out to write to. Will not be closed.
* @param o The object to write.
*/
public synchronized void writeAsXML(final ObjectOutput out, final Object o) throws IOException {
if (writeOutputStream == null) {
writeOutputStream = new ByteArrayOutputStream(16384);
}
writeOutputStream.reset();
writeXMLObject(writeOutputStream, o, new ExceptionListener() {
@Override
public void exceptionThrown(final Exception e) {
LOGGER.error(e);
}
});
final byte[] buf = writeOutputStream.toByteArray();
out.writeInt(buf.length);
out.write(buf);
}
LayoutUtilCommon.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:jo-widgets
作者:
评论列表
文章目录