当前位置: 首页>>代码示例>>Java>>正文


Java XMLStreamReaderException类代码示例

本文整理汇总了Java中com.sun.xml.internal.ws.streaming.XMLStreamReaderException的典型用法代码示例。如果您正苦于以下问题:Java XMLStreamReaderException类的具体用法?Java XMLStreamReaderException怎么用?Java XMLStreamReaderException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XMLStreamReaderException类属于com.sun.xml.internal.ws.streaming包,在下文中一共展示了XMLStreamReaderException类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFIStreamReader

import com.sun.xml.internal.ws.streaming.XMLStreamReaderException; //导入依赖的package包/类
/**
 * Returns the FI parser allocated for this thread.
 */
public static XMLStreamReader createFIStreamReader(InputStream in) {
    // Check if compatible implementation of FI was found
    if (FastInfosetReflection.fiStAXDocumentParser_new == null) {
        throw new XMLReaderException("fastinfoset.noImplementation");
    }

    try {
        // Do not use StAX pluggable layer for FI
        Object sdp = FastInfosetReflection.fiStAXDocumentParser_new.newInstance();
        FastInfosetReflection.fiStAXDocumentParser_setStringInterning.invoke(sdp, Boolean.TRUE);
        FastInfosetReflection.fiStAXDocumentParser_setInputStream.invoke(sdp, in);
        return (XMLStreamReader) sdp;
    } catch (Exception e) {
        throw new XMLStreamReaderException(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:FastInfosetUtil.java

示例2: create

import com.sun.xml.internal.ws.streaming.XMLStreamReaderException; //导入依赖的package包/类
/**
 * Creates a {@link Message} from {@link XMLStreamBuffer} that retains the
 * whole envelope infoset.
 *
 * @param xsb
 *      This buffer must contain the infoset of the whole envelope.
 */
public static @NotNull Message create(@NotNull XMLStreamBuffer xsb) {
    // TODO: we should be able to let Messae know that it's working off from a buffer,
    // to make some of the operations more efficient.
    // meanwhile, adding this as an API so that our users can take advantage of it
    // when we get around to such an implementation later.
    try {
        return create(xsb.readAsXMLStreamReader());
    } catch (XMLStreamException e) {
        throw new XMLStreamReaderException(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:Messages.java


注:本文中的com.sun.xml.internal.ws.streaming.XMLStreamReaderException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。