正在查看: Adobe Acrobat v15.3 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Adobe Acrobat v15.3 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.adobe.libs.services.d;
import android.content.Context;
import com.adobe.reader.filebrowser.ARFileEntry;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.message.BasicNameValuePair;
public final class b {
private static b i;
String[] f169a = new String[d.values().length];
private Map<e, f> j = new HashMap();
public boolean b = false;
public boolean c = false;
public ArrayList<String> d = new ArrayList<>();
public boolean e = false;
public Set<String> f = new HashSet();
public Map<String, String> g = new HashMap();
public Map<String, String> h = new HashMap();
private b() {
ArrayList arrayList = new ArrayList();
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
arrayList.add(new BasicNameValuePair("Content-Type", "application/vnd.adobe.dex+json;version=1; charset=UTF-8"));
this.j.put(e.POST_EXPORTPDF, new f(d.API, com.adobe.libs.services.h.f.POST, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_EXPORTPDF_LOCALES, new f(d.API, com.adobe.libs.services.h.f.GET, false, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_EXPORTPDF_TARGET_FORMATS, new f(d.API, com.adobe.libs.services.h.f.GET, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
arrayList.add(new BasicNameValuePair("Content-Type", "application/vnd.adobe.dex+json;version=1; charset=UTF-8"));
this.j.put(e.POST_CREATEPDF, new f(d.API, com.adobe.libs.services.h.f.POST, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_CREATEPDF_FILE_FORMATS, new f(d.API, com.adobe.libs.services.h.f.GET, false, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_USERS_ME_LIMITS_CONVERSIONS, new f(d.USERS, com.adobe.libs.services.h.f.GET, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_USERS_ME_LIMITS_ACROBAT, new f(d.USERS, com.adobe.libs.services.h.f.GET, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_USERS_ME_SUBSCRIPTIONS, new f(d.USERS, com.adobe.libs.services.h.f.GET, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.GET_USERS_ME_PREFS_RFE, new f(d.USERS, com.adobe.libs.services.h.f.GET, true, arrayList));
arrayList.clear();
arrayList.add(new BasicNameValuePair("Accept", "application/vnd.adobe.dex+json;version=1"));
this.j.put(e.PUT_USERS_ME_PREFS_RFE, new f(d.USERS, com.adobe.libs.services.h.f.PUT, true, arrayList));
this.d.clear();
this.d.add("en-us");
this.d.add("en-gb");
this.d.add("de-de");
this.d.add("es-es");
this.d.add("fr-fr");
this.d.add("it-it");
this.d.add("ja-jp");
this.d.add("da-dk");
this.d.add("fi-fi");
this.d.add("nb-no");
this.d.add("nl-nl");
this.d.add("pt-br");
this.d.add("sv-se");
this.f.clear();
this.f.add("doc");
this.f.add("docx");
this.f.add("xls");
this.f.add("xlsx");
this.f.add("ppt");
this.f.add("pptx");
this.f.add("odf");
this.f.add("odt");
this.f.add("odp");
this.f.add("ods");
this.f.add("odg");
this.f.add("sxd");
this.f.add("sxc");
this.f.add("sxi");
this.f.add("sxw");
this.f.add("stw");
this.f.add("pub");
this.f.add("ps");
this.f.add("txt");
this.f.add("text");
this.f.add("rtf");
this.f.add("bmp");
this.f.add("gif");
this.f.add("jpg");
this.f.add("jpeg");
this.f.add("png");
this.f.add("tif");
this.f.add("tiff");
this.f.add("indd");
this.f.add("ai");
this.f.add("psd");
this.f.add("form");
com.adobe.libs.services.c.a.a();
Context b = com.adobe.libs.services.c.a.b();
this.g.clear();
this.g.put("Error", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_ERROR));
this.g.put("StorageQuotaExceeded", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_STORAGE_QUOTA_EXCEEDED));
this.g.put("CloudError", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_ERROR));
this.g.put("DocumentCorrupted", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_DOCUMENT_CORRUPTED));
this.g.put("ExportPDFQuotaExceeded", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_QUOTA_EXCEEDED));
this.g.put("PDFIsPortfolio", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_PDF_PORTFOLIO));
this.g.put("PDFNoTables", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_PDF_NOTABLES));
this.g.put("SourceIsEncrypted", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_PASSWORD_PROTECTED));
this.g.put(com.adobe.libs.services.a.y.NETWORK_TIMED_OUT, b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_TIME_OUT));
this.g.put("PDFIsEncryptedOrForm", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_ENCRYPTED_OR_FORM));
this.g.put("PDFPolicyProtected", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_POLICY_PROTECTED));
this.g.put("PDFIsXFAForm", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_XFA_FORM));
this.g.put("StorageLimitExceeded", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_STORAGE_QUOTA_EXCEEDED));
this.g.put("UploadTooLarge", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_TOO_LARGE));
this.g.put("VirusDetected", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_VIRUS_DETECTED));
this.g.put("MissingParameter", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_FILE_NOT_FOUND));
this.g.put(com.adobe.libs.services.a.y.OBJECT_NOT_FOUND, b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_FILE_NOT_FOUND));
this.g.put("QuotaExceeded", b.getString(com.adobe.libs.services.f.IDS_EXPORT_FAILED_FORBIDDEN));
this.h.clear();
this.h.put("Error", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_ERROR));
this.h.put("StorageQuotaExceeded", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_STORAGE_QUOTA_EXCEEDED));
this.h.put("CloudError", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_ERROR));
this.h.put("SourceIsEncrypted", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_PASSWORD_PROTECTED));
this.h.put(com.adobe.libs.services.a.y.NETWORK_TIMED_OUT, b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_TIME_OUT));
this.h.put("StorageLimitExceeded", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_STORAGE_QUOTA_EXCEEDED));
this.h.put("UploadTooLarge", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_TOO_LARGE));
this.h.put("VirusDetected", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_VIRUS_DETECTED));
this.h.put("UnsupportedType", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_UNSUPPORTED_TYPE));
this.h.put("CreatePDFQuotaExceeded", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_QUOTA_EXCEEDED));
this.h.put("MissingParameter", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_FILE_NOT_FOUND));
this.h.put(com.adobe.libs.services.a.y.OBJECT_NOT_FOUND, b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_FILE_NOT_FOUND));
this.h.put("QuotaExceeded", b.getString(com.adobe.libs.services.f.IDS_CREATE_FAILED_FORBIDDEN));
}
public static synchronized b a() {
b bVar;
synchronized (b.class) {
if (i == null) {
i = new b();
}
bVar = i;
}
return bVar;
}
public final HttpRequestBase a(e eVar) {
if (!this.b) {
HttpGet httpGet = new HttpGet("https://createpdf.acrobat.com/createpdf/api/base_uris");
httpGet.addHeader("Accept", "application/vnd.adobe.dex+json;version=1");
httpGet.addHeader("x-api-client-id", com.adobe.libs.services.c.a.d());
a.c.c a2 = com.adobe.libs.services.g.a(httpGet, com.adobe.libs.services.h.f.GET);
try {
String g = a2.g("ims");
String g2 = a2.g("api");
String g3 = a2.g("users");
if (!com.adobe.libs.services.h.n.g(g) || !com.adobe.libs.services.h.n.g(g2) || !com.adobe.libs.services.h.n.g(g3)) {
throw new IOException();
}
this.f169a[d.IMS.ordinal()] = g;
this.f169a[d.API.ordinal()] = g2;
this.f169a[d.USERS.ordinal()] = g3;
this.b = true;
} catch (a.c.b e) {
throw new IOException();
}
}
HttpRequestBase a3 = this.j.get(eVar).a();
String str = ARFileEntry.DEFAULT_ENTRY_ICON_STRING;
switch (c.f170a[eVar.ordinal()]) {
case 1:
str = "exportpdf";
break;
case 2:
str = "exportpdf/locales";
break;
case 3:
str = "exportpdf/target_formats?validated=1";
break;
case 4:
str = "createpdf";
break;
case 5:
str = "createpdf/file_formats";
break;
case 6:
str = "users/me/limits/conversions";
break;
case 7:
str = "users/me/limits/acrobat";
break;
case 8:
str = "users/me/subscriptions";
break;
case 9:
str = "users/me/prefs/rfe";
break;
case 10:
str = "users/me/prefs/rfe";
break;
}
if (str.length() > 0) {
try {
a3.setURI(new URI(a3.getURI() + str));
} catch (URISyntaxException e2) {
e2.printStackTrace();
}
}
if (this.j.get(eVar).b) {
a3.setHeader("Authorization", "Bearer " + com.adobe.libs.services.g.a());
}
return a3;
}
public final a.c.c b(e eVar) {
return com.adobe.libs.services.g.a(a(eVar), this.j.get(eVar).f173a);
}
}