com.sun.xml.internal.ws.streaming.XMLReaderException Java Examples

The following examples show how to use com.sun.xml.internal.ws.streaming.XMLReaderException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FastInfosetUtil.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #2
Source File: XMLStreamReaderFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #3
Source File: FastInfosetUtil.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #4
Source File: FastInfosetUtil.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #5
Source File: XMLStreamReaderFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #6
Source File: FastInfosetUtil.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #7
Source File: XMLStreamReaderFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #8
Source File: FastInfosetUtil.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #9
Source File: FastInfosetUtil.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #10
Source File: XMLStreamReaderFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #11
Source File: FastInfosetUtil.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #12
Source File: XMLStreamReaderFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #13
Source File: FastInfosetUtil.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
    }
}
 
Example #14
Source File: XMLStreamReaderFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #15
Source File: XMLStreamReaderFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #16
Source File: XMLStreamReaderFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
    try {
        // Char stream available?
        if (source.getCharacterStream() != null) {
            return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
        }

        // Byte stream available?
        if (source.getByteStream() != null) {
            return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
        }

        // Otherwise, open URI
        return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
    } catch (IOException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #17
Source File: XMLStreamWriterFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public synchronized XMLStreamWriter doCreate(OutputStream out, String encoding) {
    try {
        XMLStreamWriter writer = xof.createXMLStreamWriter(out,encoding);
        return new HasEncodingWriter(writer, encoding);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #18
Source File: XMLStreamReaderFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
    try {
        return xif.createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #19
Source File: XMLStreamReaderFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
    try {
        return xif.createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #20
Source File: XMLStreamReaderFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
    try {
        return xif.get().createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #21
Source File: XMLStreamReaderFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
    try {
        return xif.get().createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #22
Source File: XMLStreamReaderFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
    try {
        return xif.createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #23
Source File: XMLStreamWriterFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public synchronized XMLStreamWriter doCreate(OutputStream out, String encoding) {
    try {
        XMLStreamWriter writer = xof.createXMLStreamWriter(out,encoding);
        return new HasEncodingWriter(writer, encoding);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #24
Source File: XMLStreamWriterFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamWriter doCreate(OutputStream out, String encoding) {
    try {
        XMLStreamWriter writer = xof.createXMLStreamWriter(out,encoding);
        return new HasEncodingWriter(writer, encoding);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #25
Source File: XMLStreamWriterFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public synchronized XMLStreamWriter doCreate(OutputStream out, String encoding) {
    try {
        XMLStreamWriter writer = xof.createXMLStreamWriter(out,encoding);
        return new HasEncodingWriter(writer, encoding);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #26
Source File: XMLStreamReaderFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
    try {
        return xif.createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #27
Source File: XMLStreamReaderFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
    try {
        return xif.createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #28
Source File: XMLStreamReaderFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
    try {
        return xif.get().createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #29
Source File: XMLStreamReaderFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
    try {
        return xif.get().createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}
 
Example #30
Source File: XMLStreamReaderFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
    try {
        return xif.createXMLStreamReader(systemId,in);
    } catch (XMLStreamException e) {
        throw new XMLReaderException("stax.cantCreate",e);
    }
}