public class EncodeUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canAsciiEncode(java.lang.String text)
Checks if some text may be encoded using ASCII.
|
static java.lang.String |
decode(byte[] data,
com.android.tools.build.apkzlib.zip.GPFlags flags)
Decodes a file name.
|
static java.lang.String |
decode(java.nio.ByteBuffer bytes,
int length,
com.android.tools.build.apkzlib.zip.GPFlags flags)
Decodes a file name.
|
static byte[] |
encode(java.lang.String name,
com.android.tools.build.apkzlib.zip.GPFlags flags)
Encodes a file name.
|
public static java.lang.String decode(java.nio.ByteBuffer bytes,
int length,
com.android.tools.build.apkzlib.zip.GPFlags flags)
throws java.io.IOException
bytes - the raw data buffer to read fromlength - the number of bytes in the raw data buffer containing the string to decodeflags - the zip entry flagsjava.io.IOExceptionpublic static java.lang.String decode(byte[] data,
com.android.tools.build.apkzlib.zip.GPFlags flags)
data - the raw dataflags - the zip entry flagspublic static byte[] encode(java.lang.String name,
com.android.tools.build.apkzlib.zip.GPFlags flags)
name - the name to encodeflags - the zip entry flagspublic static boolean canAsciiEncode(java.lang.String text)
text - the text to check