public class XmlParserHelper extends Object
Constructor and Description |
---|
XmlParserHelper(Context context) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStreamForResource(String resource)
Returns an input stream for the specified resource.
|
<T> T |
getJaxbRoot(InputStream stream,
Class<T> clazz,
Schema schema) |
Schema |
getSchema(String schemaResource) |
public XmlParserHelper(Context context)
public InputStream getInputStreamForResource(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 Schema getSchema(String schemaResource) throws XmlParsingException
XmlParsingException
public <T> T getJaxbRoot(InputStream stream, Class<T> clazz, Schema schema) throws XmlParsingException
XmlParsingException
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.