public class ParseUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.nio.charset.Charset |
CHARSET_UTF_8 |
| Constructor and Description |
|---|
ParseUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkChunkType(int expected,
int real) |
static java.lang.String |
getResourceById(long resourceId,
ResourceTable table,
java.util.Locale locale)
Get resource value by string-format via resourceId.
|
static ResourceEntity |
readResValue(java.nio.ByteBuffer buffer,
StringPool stringPool)
Read res value, convert from different types to string.
|
static java.lang.String |
readRGBs(java.nio.ByteBuffer buffer,
int strLen)
Read resource value RGB/ARGB type.
|
static java.lang.String |
readString(java.nio.ByteBuffer buffer,
boolean utf8)
Read string from input buffer.
|
static StringPool |
readStringPool(java.nio.ByteBuffer buffer,
StringPoolHeader stringPoolHeader)
Read String pool, for APK binary xml file and resource table.
|
static java.lang.String |
readStringUTF16(java.nio.ByteBuffer buffer,
int strLen)
Read utf-16 encoding str, use zero char to end str.
|
public static java.lang.String readString(java.nio.ByteBuffer buffer,
boolean utf8)
public static java.lang.String readStringUTF16(java.nio.ByteBuffer buffer,
int strLen)
public static StringPool readStringPool(java.nio.ByteBuffer buffer, StringPoolHeader stringPoolHeader)
public static java.lang.String readRGBs(java.nio.ByteBuffer buffer,
int strLen)
public static ResourceEntity readResValue(java.nio.ByteBuffer buffer, StringPool stringPool)
public static void checkChunkType(int expected,
int real)
throws ParserException
ParserExceptionpublic static java.lang.String getResourceById(long resourceId,
ResourceTable table,
java.util.Locale locale)