/**
* Return the {@link XMLEventWriter} for the given StAX Result.
* @param result a JAXP 1.4 {@link StAXResult}
* @return the {@link XMLStreamReader}
* @throws IllegalArgumentException if {@code source} isn't a JAXP 1.4 {@link StAXResult}
* or custom StAX Result
*/
public static XMLEventWriter getXMLEventWriter(Result result) {
if (result instanceof StAXResult) {
return ((StAXResult) result).getXMLEventWriter();
}
else if (result instanceof StaxResult) {
return ((StaxResult) result).getXMLEventWriter();
}
else {
throw new IllegalArgumentException("Result '" + result + "' is neither StaxResult nor StAXResult");
}
}
StaxUtils.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:spring4-understanding
作者:
评论列表
文章目录