Package brut.androlib.res.decoder
Class AXmlResourceParser
java.lang.Object
brut.androlib.res.decoder.AXmlResourceParser
- All Implemented Interfaces:
XmlResourceParser,AttributeSet,org.xmlpull.v1.XmlPullParser
- Direct Known Subclasses:
AndroidManifestResourceParser
Binary xml files parser.
Parser has only two states: (1) Operational state, which parser obtains after first successful call to next() and retains until open(), close(), or failed call to next(). (2) Closed state, which parser obtains after open(), close(), or failed call to next(). In this state methods return invalid values or throw exceptions.
-
Field Summary
Fields inherited from interface org.xmlpull.v1.XmlPullParser
CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this interface to the resource.decodeFromResourceId(int attrResId) voiddefineEntityReplacementText(String entityName, String replacementText) booleangetAttributeBooleanValue(int index, boolean defaultValue) booleangetAttributeBooleanValue(String namespace, String attribute, boolean defaultValue) intfloatgetAttributeFloatValue(int index, float defaultValue) floatgetAttributeFloatValue(String namespace, String attribute, float defaultValue) intgetAttributeIntValue(int index, int defaultValue) intgetAttributeIntValue(String namespace, String attribute, int defaultValue) intgetAttributeListValue(int index, String[] options, int defaultValue) intgetAttributeListValue(String namespace, String attribute, String[] options, int defaultValue) getAttributeName(int index) intgetAttributeNameResource(int index) getAttributeNamespace(int index) getAttributePrefix(int index) intgetAttributeResourceValue(int index, int defaultValue) intgetAttributeResourceValue(String namespace, String attribute, int defaultValue) getAttributeType(int index) intgetAttributeUnsignedIntValue(int index, int defaultValue) intgetAttributeUnsignedIntValue(String namespace, String attribute, int defaultValue) getAttributeValue(int index) getAttributeValue(String namespace, String attribute) intgetAttributeValueData(int index) intgetAttributeValueType(int index) intintgetDepth()intbooleangetFeature(String feature) intgetIdAttributeResourceValue(int defaultValue) intgetName()getNamespace(String prefix) intgetNamespaceCount(int depth) getNamespacePrefix(int pos) getNamespaceUri(int pos) getProperty(String name) intgetText()char[]getTextCharacters(int[] holderForStartAndLength) booleanisAttributeDefault(int index) booleanbooleanintnext()intnextTag()nextText()intvoidopen(InputStream stream) voidvoidsetFeature(String name, boolean value) voidsetInput(InputStream stream, String inputEncoding) voidvoidsetProperty(String name, Object value)
-
Constructor Details
-
AXmlResourceParser
-
-
Method Details
-
getFirstError
-
getResTable
-
open
-
close
public void close()Description copied from interface:XmlResourceParserClose this interface to the resource. Calls on the interface are no longer value after this call.- Specified by:
closein interfaceXmlResourceParser
-
next
- Specified by:
nextin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
nextToken
- Specified by:
nextTokenin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
nextTag
- Specified by:
nextTagin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
nextText
- Specified by:
nextTextin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserExceptionIOException
-
require
public void require(int type, String namespace, String name) throws org.xmlpull.v1.XmlPullParserException - Specified by:
requirein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
getDepth
public int getDepth()- Specified by:
getDepthin interfaceorg.xmlpull.v1.XmlPullParser
-
getEventType
public int getEventType()- Specified by:
getEventTypein interfaceorg.xmlpull.v1.XmlPullParser
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceorg.xmlpull.v1.XmlPullParser
-
getName
- Specified by:
getNamein interfaceorg.xmlpull.v1.XmlPullParser
-
getText
- Specified by:
getTextin interfaceorg.xmlpull.v1.XmlPullParser
-
getTextCharacters
public char[] getTextCharacters(int[] holderForStartAndLength) - Specified by:
getTextCharactersin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespace
- Specified by:
getNamespacein interfaceorg.xmlpull.v1.XmlPullParser
-
getPrefix
- Specified by:
getPrefixin interfaceorg.xmlpull.v1.XmlPullParser
-
getPositionDescription
- Specified by:
getPositionDescriptionin interfaceAttributeSet- Specified by:
getPositionDescriptionin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespaceCount
public int getNamespaceCount(int depth) - Specified by:
getNamespaceCountin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespacePrefix
- Specified by:
getNamespacePrefixin interfaceorg.xmlpull.v1.XmlPullParser
-
getNamespaceUri
- Specified by:
getNamespaceUriin interfaceorg.xmlpull.v1.XmlPullParser
-
getClassAttribute
- Specified by:
getClassAttributein interfaceAttributeSet
-
getIdAttribute
- Specified by:
getIdAttributein interfaceAttributeSet
-
getIdAttributeResourceValue
public int getIdAttributeResourceValue(int defaultValue) - Specified by:
getIdAttributeResourceValuein interfaceAttributeSet
-
getStyleAttribute
public int getStyleAttribute()- Specified by:
getStyleAttributein interfaceAttributeSet
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCountin interfaceAttributeSet- Specified by:
getAttributeCountin interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeNamespace
- Specified by:
getAttributeNamespacein interfaceorg.xmlpull.v1.XmlPullParser
-
decodeFromResourceId
- Throws:
AndrolibException
-
getAttributePrefix
- Specified by:
getAttributePrefixin interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeName
- Specified by:
getAttributeNamein interfaceAttributeSet- Specified by:
getAttributeNamein interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeNameResource
public int getAttributeNameResource(int index) - Specified by:
getAttributeNameResourcein interfaceAttributeSet
-
getAttributeValueType
public int getAttributeValueType(int index) - Specified by:
getAttributeValueTypein interfaceAttributeSet
-
getAttributeValueData
public int getAttributeValueData(int index) - Specified by:
getAttributeValueDatain interfaceAttributeSet
-
getAttributeValue
- Specified by:
getAttributeValuein interfaceAttributeSet- Specified by:
getAttributeValuein interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeBooleanValue
public boolean getAttributeBooleanValue(int index, boolean defaultValue) - Specified by:
getAttributeBooleanValuein interfaceAttributeSet
-
getAttributeFloatValue
public float getAttributeFloatValue(int index, float defaultValue) - Specified by:
getAttributeFloatValuein interfaceAttributeSet
-
getAttributeIntValue
public int getAttributeIntValue(int index, int defaultValue) - Specified by:
getAttributeIntValuein interfaceAttributeSet
-
getAttributeUnsignedIntValue
public int getAttributeUnsignedIntValue(int index, int defaultValue) - Specified by:
getAttributeUnsignedIntValuein interfaceAttributeSet
-
getAttributeResourceValue
public int getAttributeResourceValue(int index, int defaultValue) - Specified by:
getAttributeResourceValuein interfaceAttributeSet
-
getAttributeValue
- Specified by:
getAttributeValuein interfaceAttributeSet- Specified by:
getAttributeValuein interfaceorg.xmlpull.v1.XmlPullParser
-
getAttributeBooleanValue
- Specified by:
getAttributeBooleanValuein interfaceAttributeSet
-
getAttributeFloatValue
- Specified by:
getAttributeFloatValuein interfaceAttributeSet
-
getAttributeIntValue
- Specified by:
getAttributeIntValuein interfaceAttributeSet
-
getAttributeUnsignedIntValue
- Specified by:
getAttributeUnsignedIntValuein interfaceAttributeSet
-
getAttributeResourceValue
- Specified by:
getAttributeResourceValuein interfaceAttributeSet
-
getAttributeListValue
- Specified by:
getAttributeListValuein interfaceAttributeSet
-
getAttributeListValue
public int getAttributeListValue(String namespace, String attribute, String[] options, int defaultValue) - Specified by:
getAttributeListValuein interfaceAttributeSet
-
getAttributeType
- Specified by:
getAttributeTypein interfaceorg.xmlpull.v1.XmlPullParser
-
isAttributeDefault
public boolean isAttributeDefault(int index) - Specified by:
isAttributeDefaultin interfaceorg.xmlpull.v1.XmlPullParser
-
setInput
- Specified by:
setInputin interfaceorg.xmlpull.v1.XmlPullParser
-
setInput
- Specified by:
setInputin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
getInputEncoding
- Specified by:
getInputEncodingin interfaceorg.xmlpull.v1.XmlPullParser
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceorg.xmlpull.v1.XmlPullParser
-
isEmptyElementTag
public boolean isEmptyElementTag()- Specified by:
isEmptyElementTagin interfaceorg.xmlpull.v1.XmlPullParser
-
isWhitespace
public boolean isWhitespace()- Specified by:
isWhitespacein interfaceorg.xmlpull.v1.XmlPullParser
-
defineEntityReplacementText
public void defineEntityReplacementText(String entityName, String replacementText) throws org.xmlpull.v1.XmlPullParserException - Specified by:
defineEntityReplacementTextin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
getNamespace
- Specified by:
getNamespacein interfaceorg.xmlpull.v1.XmlPullParser
-
getProperty
- Specified by:
getPropertyin interfaceorg.xmlpull.v1.XmlPullParser
-
setProperty
- Specified by:
setPropertyin interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-
getFeature
- Specified by:
getFeaturein interfaceorg.xmlpull.v1.XmlPullParser
-
setFeature
- Specified by:
setFeaturein interfaceorg.xmlpull.v1.XmlPullParser- Throws:
org.xmlpull.v1.XmlPullParserException
-