T
- Return type for parserpublic abstract class BaseParser<T> extends Object
Constructor and Description |
---|
BaseParser() |
Modifier and Type | Method and Description |
---|---|
String |
getLocation(XMLStreamReader parser) |
T |
parse(InputStream in)
Parse InputStream.
|
abstract T |
parse(XMLStreamReader parser) |
protected double |
readDoubleAttribute(XMLStreamReader parser,
String name) |
protected float |
readFloatTag(XMLStreamReader parser,
String tagName) |
protected int |
readIntAttribute(XMLStreamReader parser,
String name) |
protected int |
readIntTag(XMLStreamReader parser,
String tagName) |
protected long |
readLongAttribute(XMLStreamReader parser,
String name) |
protected long |
readLongTag(XMLStreamReader parser,
String tagName) |
protected String |
readStringAttribute(XMLStreamReader parser,
String name) |
protected String |
readStringAttribute(XMLStreamReader parser,
String name,
boolean required) |
protected String |
readTag(XMLStreamReader parser,
String tagName) |
protected void |
skipTag(XMLStreamReader parser) |
protected static final String NAMESPACE
public T parse(InputStream in) throws IOException, XMLStreamException
in
- InputStream to read fromIOException
XMLStreamException
public abstract T parse(XMLStreamReader parser) throws XMLStreamException, IOException
XMLStreamException
IOException
protected int readIntAttribute(XMLStreamReader parser, String name) throws XMLStreamException
XMLStreamException
protected double readDoubleAttribute(XMLStreamReader parser, String name) throws XMLStreamException
XMLStreamException
protected long readLongAttribute(XMLStreamReader parser, String name) throws XMLStreamException
XMLStreamException
protected String readStringAttribute(XMLStreamReader parser, String name) throws XMLStreamException
XMLStreamException
protected String readStringAttribute(XMLStreamReader parser, String name, boolean required) throws XMLStreamException
XMLStreamException
protected String readTag(XMLStreamReader parser, String tagName) throws IOException, XMLStreamException
IOException
XMLStreamException
protected int readIntTag(XMLStreamReader parser, String tagName) throws IOException, XMLStreamException
IOException
XMLStreamException
protected long readLongTag(XMLStreamReader parser, String tagName) throws IOException, XMLStreamException
IOException
XMLStreamException
protected float readFloatTag(XMLStreamReader parser, String tagName) throws IOException, XMLStreamException
IOException
XMLStreamException
protected void skipTag(XMLStreamReader parser) throws XMLStreamException, IOException
XMLStreamException
IOException
public String getLocation(XMLStreamReader parser)
Copyright © 2015. All rights reserved.