本文整理了Java中org.apereo.portal.xml.XmlUtilities.getXmlInputFactory()
方法的一些代码示例,展示了XmlUtilities.getXmlInputFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtilities.getXmlInputFactory()
方法的具体详情如下:
包路径:org.apereo.portal.xml.XmlUtilities
类名称:XmlUtilities
方法名:getXmlInputFactory
[英]The standard shared XMLInputFactory to be used by uPortal code. Clients should not set any properties on this XMLInputFactory, if they need to they should use XMLInputFactory#newFactory() directly
[中]uPortal代码使用的标准共享XMLInputFactory。客户端不应在此XMLInputFactory上设置任何属性,如果需要,应直接使用XMLInputFactory#newFactory()
代码示例来源:origin: org.jasig.portal/uPortal-api-rest
protected BufferedXMLEventReader createSourceXmlEventReader(MultipartFile multipartFile)
throws IOException {
final InputStream inputStream = multipartFile.getInputStream();
final String name = multipartFile.getOriginalFilename();
final XMLInputFactory xmlInputFactory = this.xmlUtilities.getXmlInputFactory();
final XMLEventReader xmlEventReader;
try {
xmlEventReader = xmlInputFactory.createXMLEventReader(name, inputStream);
} catch (XMLStreamException e) {
throw new RuntimeException("Failed to create XML Event Reader for data Source", e);
}
return new BufferedXMLEventReader(xmlEventReader, -1);
}
代码示例来源:origin: org.jasig.portal/uPortal-layout-impl
@Override
public XMLEventReader getUserLayoutReader() {
Document ul = this.getUserLayoutDOM();
if (ul == null) {
throw new PortalException(
"User layout has not been initialized for " + owner.getUserName());
}
final XMLInputFactory xmlInputFactory = this.xmlUtilities.getXmlInputFactory();
final DOMSource layoutSoure = new DOMSource(ul);
try {
return xmlInputFactory.createXMLEventReader(layoutSoure);
} catch (XMLStreamException e) {
throw new RuntimeException(
"Failed to create Layout XMLStreamReader for user: " + owner.getUserName(), e);
}
}
代码示例来源:origin: Jasig/uPortal
private BufferedXMLEventReader createSourceXmlEventReader(final Source source) {
// If it is a StAXSource see if we can do better handling of it
if (source instanceof StAXSource) {
final StAXSource staxSource = (StAXSource) source;
XMLEventReader xmlEventReader = staxSource.getXMLEventReader();
if (xmlEventReader != null) {
if (xmlEventReader instanceof BufferedXMLEventReader) {
final BufferedXMLEventReader bufferedXMLEventReader =
(BufferedXMLEventReader) xmlEventReader;
bufferedXMLEventReader.reset();
bufferedXMLEventReader.mark(-1);
return bufferedXMLEventReader;
}
return new BufferedXMLEventReader(xmlEventReader, -1);
}
}
final XMLInputFactory xmlInputFactory = this.xmlUtilities.getXmlInputFactory();
final XMLEventReader xmlEventReader;
try {
xmlEventReader = xmlInputFactory.createXMLEventReader(source);
} catch (XMLStreamException e) {
throw new RuntimeException("Failed to create XML Event Reader for data Source", e);
}
return new BufferedXMLEventReader(xmlEventReader, -1);
}
代码示例来源:origin: org.jasig.portal/uPortal-io-core
private BufferedXMLEventReader createSourceXmlEventReader(final Source source) {
// If it is a StAXSource see if we can do better handling of it
if (source instanceof StAXSource) {
final StAXSource staxSource = (StAXSource) source;
XMLEventReader xmlEventReader = staxSource.getXMLEventReader();
if (xmlEventReader != null) {
if (xmlEventReader instanceof BufferedXMLEventReader) {
final BufferedXMLEventReader bufferedXMLEventReader =
(BufferedXMLEventReader) xmlEventReader;
bufferedXMLEventReader.reset();
bufferedXMLEventReader.mark(-1);
return bufferedXMLEventReader;
}
return new BufferedXMLEventReader(xmlEventReader, -1);
}
}
final XMLInputFactory xmlInputFactory = this.xmlUtilities.getXmlInputFactory();
final XMLEventReader xmlEventReader;
try {
xmlEventReader = xmlInputFactory.createXMLEventReader(source);
} catch (XMLStreamException e) {
throw new RuntimeException("Failed to create XML Event Reader for data Source", e);
}
return new BufferedXMLEventReader(xmlEventReader, -1);
}
代码示例来源:origin: org.jasig.portal/uPortal-web
final XMLInputFactory xmlInputFactory = this.xmlUtilities.getXmlInputFactory();
final XMLStreamReader xml;
try {
内容来源于网络,如有侵权,请联系作者删除!