public class ResourcesXml extends ResChunk
The header is followed by a StringPool containing all the strings used in the xml. This is then followed by an optional RefMap. After the StringPool/RefMap comes a list of xml nodes of the form: ResChunk_header u16 chunk_type u16 header_size u32 chunk_size u32 lineNumber StringRef comment
Each node contains extra information depending on the type:
XML_START_NS: StringRef prefix StringRef uri
XML_END_NS: StringRef prefix StringRef uri
XML_CDATA: StringRef data Res_value typedData
XML_END_ELEMENT: StringRef namespace StringRef name
XML_START_ELEMENT: StringRef namespace StringRef name u16 attrStart u16 attrSize u16 attrCount u16 idIndex u16 classIndex u16 styleIndex
XML_START_ELEMENT is then followed by attrCount attributes of the form: StringRef namespace StringRef name StringRef rawValue Res_value typedValue
ResChunk.RefTransformer, ResChunk.RefVisitor
Modifier and Type | Field and Description |
---|---|
static int |
ATTRIBUTE_SIZE |
static int |
HEADER_SIZE |
CHUNK_RES_TABLE_PACKAGE, CHUNK_RES_TABLE_TYPE, CHUNK_RES_TABLE_TYPE_SPEC, CHUNK_RESOURCE_TABLE, CHUNK_STRING_POOL, CHUNK_XML_REF_MAP, CHUNK_XML_TREE
Modifier and Type | Method and Description |
---|---|
void |
dump(PrintStream out) |
static ResourcesXml |
get(ByteBuffer buf) |
StringPool |
getStrings() |
void |
put(ByteBuffer buf) |
void |
transformReferences(ResChunk.RefTransformer visitor) |
void |
visitReferences(ResChunk.RefVisitor visitor) |
getChunkSize, getHeaderSize, getTotalSize, getType, serialize, slice, slice, wrap
public static final int HEADER_SIZE
public static final int ATTRIBUTE_SIZE
public static ResourcesXml get(ByteBuffer buf)
public void put(ByteBuffer buf)
public void transformReferences(ResChunk.RefTransformer visitor)
public void visitReferences(ResChunk.RefVisitor visitor)
public void dump(PrintStream out)
public StringPool getStrings()