public class XmlParserHelper
extends java.lang.Object
Constructor and Description |
---|
XmlParserHelper(Context context) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStreamForResource(java.lang.String resource)
Returns an input stream for the specified resource.
|
<T> T |
getJaxbRoot(java.io.InputStream stream,
java.lang.Class<T> clazz,
javax.xml.validation.Schema schema) |
javax.xml.validation.Schema |
getSchema(java.lang.String schemaResource) |
public XmlParserHelper(Context context)
public java.io.InputStream getInputStreamForResource(java.lang.String resource)
Filer
API and if that fails Class.getResourceAsStream(java.lang.String)
is used.resource
- the resource to loadnull
in case resource cannot be loadedpublic javax.xml.validation.Schema getSchema(java.lang.String schemaResource) throws XmlParsingException
XmlParsingException
public <T> T getJaxbRoot(java.io.InputStream stream, java.lang.Class<T> clazz, javax.xml.validation.Schema schema) throws XmlParsingException
XmlParsingException
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.