public class ApkParser
extends java.lang.Object
implements java.io.Closeable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
ApkMeta |
getApkMeta()
return decoded AndroidManifest.xml
|
java.util.List<CertificateMeta> |
getCertificateMetaList()
get the apk's certificates.
|
DexClass[] |
getDexClasses()
get class infos form dex file. currently only class name
|
byte[] |
getFileData(java.lang.String path)
read file in apk into bytes
|
Icon |
getIconFile()
get the apk icon file as bytes.
|
java.util.Set<java.util.Locale> |
getLocales()
get locales supported from resource file
|
java.lang.String |
getManifestXml()
return decoded AndroidManifest.xml
|
java.util.Locale |
getPreferredLocale() |
void |
setPreferredLocale(java.util.Locale preferredLocale)
The locale preferred.
|
java.lang.String |
transBinaryXml(java.lang.String path)
trans binary xml file to text xml file.
|
ApkSignStatus |
verifyApk()
check apk sign
|
public ApkParser(java.io.File apkFile)
throws java.io.IOException
java.io.IOExceptionpublic ApkParser(java.lang.String filePath)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getManifestXml()
throws java.io.IOException
java.io.IOExceptionpublic ApkMeta getApkMeta() throws java.io.IOException
java.io.IOExceptionpublic java.util.Set<java.util.Locale> getLocales()
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<CertificateMeta> getCertificateMetaList() throws java.io.IOException, java.security.cert.CertificateException
java.io.IOExceptionjava.security.cert.CertificateExceptionpublic java.lang.String transBinaryXml(java.lang.String path)
throws java.io.IOException
path - the xml file path in apk filejava.io.IOExceptionpublic Icon getIconFile() throws java.io.IOException
java.io.IOExceptionpublic DexClass[] getDexClasses() throws java.io.IOException
java.io.IOExceptionpublic byte[] getFileData(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic ApkSignStatus verifyApk() throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseablejava.io.IOExceptionpublic java.util.Locale getPreferredLocale()
public void setPreferredLocale(java.util.Locale preferredLocale)