public class ResTablePackage extends ResChunk
The header is followed by a types string pool (containing types like "id", "attr", "drawable", ...) and a keys string pool (containing the names of resources). Then follows a TypeSpec for each type (# of types can be derived from the size of the types stringpool).
ResChunk.RefTransformer, ResChunk.RefVisitor
Modifier and Type | Field and Description |
---|---|
static int |
APP_PACKAGE_ID |
static int |
HEADER_SIZE |
static int |
NAME_DATA_LENGTH |
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
Constructor and Description |
---|
ResTablePackage(int chunkSize,
int packageId,
byte[] nameData,
StringPool types,
StringPool keys,
List<ResTableTypeSpec> typeSpecs) |
Modifier and Type | Method and Description |
---|---|
void |
dump(StringPool strings,
PrintStream out) |
StringPool |
getKeys() |
byte[] |
getNameData() |
String |
getRefName(int i) |
StringPool |
getTypes() |
ResTableTypeSpec |
getTypeSpec(int type) |
List<ResTableTypeSpec> |
getTypeSpecs() |
void |
put(ByteBuffer output) |
void |
reassignIds(ReferenceMapper refMapping) |
static ResTablePackage |
slice(ResTablePackage resPackage,
Map<Integer,Integer> countsToSlice) |
void |
transformStringReferences(ResChunk.RefTransformer visitor) |
void |
visitStringReferences(ResChunk.RefVisitor visitor) |
getChunkSize, getHeaderSize, getTotalSize, getType, serialize, slice, slice, wrap
public static final int HEADER_SIZE
public static final int APP_PACKAGE_ID
public static final int NAME_DATA_LENGTH
public ResTablePackage(int chunkSize, int packageId, byte[] nameData, StringPool types, StringPool keys, List<ResTableTypeSpec> typeSpecs)
public void reassignIds(ReferenceMapper refMapping)
public static ResTablePackage slice(ResTablePackage resPackage, Map<Integer,Integer> countsToSlice)
public void put(ByteBuffer output)
public void dump(StringPool strings, PrintStream out)
public List<ResTableTypeSpec> getTypeSpecs()
public StringPool getKeys()
public ResTableTypeSpec getTypeSpec(int type)
public StringPool getTypes()
public byte[] getNameData()
public void transformStringReferences(ResChunk.RefTransformer visitor)
public void visitStringReferences(ResChunk.RefVisitor visitor)
public String getRefName(int i)