use of com.sun.xml.fastinfoset.stax.StAXDocumentParser in project cxf by apache.
the class FIStaxInInterceptor method getParser.
private XMLStreamReader getParser(InputStream in) {
StAXDocumentParser parser = new StAXDocumentParser(in);
parser.setStringInterning(true);
parser.setForceStreamClose(true);
parser.setInputStream(in);
return parser;
}
use of com.sun.xml.fastinfoset.stax.StAXDocumentParser in project cxf by apache.
the class TunedDocumentLoader method loadFastinfosetDocument.
static Document loadFastinfosetDocument(URL url) throws IOException, ParserConfigurationException, XMLStreamException {
try (InputStream in = new BufferedInputStream(url.openStream())) {
XMLStreamReader staxReader = new StAXDocumentParser(in);
W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
StaxUtils.copy(staxReader, writer);
staxReader.close();
return writer.getDocument();
}
}
Aggregations