SharedPdfDocument.java
2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.aemfd.docmanager.Document
* com.adobe.aemfd.docmanager.passivation.DocumentPassivationHandler
* com.adobe.internal.pdftoolkit.pdf.document.PDFDocument
* com.adobe.internal.pdftoolkit.pdf.document.PDFSaveOptions
*/
package com.adobe.aemfd.pdfdocmanager;
import com.adobe.aemfd.docmanager.Document;
import com.adobe.aemfd.docmanager.passivation.DocumentPassivationHandler;
import com.adobe.aemfd.pdfdocmanager.internal.passivation.PDFDocumentPassivationHandler;
import com.adobe.internal.pdftoolkit.pdf.document.PDFDocument;
import com.adobe.internal.pdftoolkit.pdf.document.PDFSaveOptions;
import java.io.IOException;
public class SharedPdfDocument
extends Document {
private static final String PDF_DOC_ATTR_KEY = "pdfdocmanager.docattributes.PDFDocument";
private static final String PDF_SAVE_OPT_ATTR_KEY = "pdfdocmanager.docattributes.PDFSaveOptions";
SharedPdfDocument(PDFDocument pdfDoc, PDFSaveOptions options) {
super((DocumentPassivationHandler)new PDFDocumentPassivationHandler(pdfDoc, options));
this.setAttribute("pdfdocmanager.docattributes.PDFDocument", (Object)pdfDoc);
this.setAttribute("pdfdocmanager.docattributes.PDFSaveOptions", (Object)options);
this.setContentType("application/pdf");
}
public PDFDocument getPDFDocument() {
this.checkDisposed();
return (PDFDocument)this.getAttribute("pdfdocmanager.docattributes.PDFDocument");
}
public PDFSaveOptions getSaveOptions() {
this.checkDisposed();
return (PDFSaveOptions)this.getAttribute("pdfdocmanager.docattributes.PDFSaveOptions");
}
public long length() throws IOException {
throw new UnsupportedOperationException("length() not supported on PDF-based documents!");
}
public String getContentType() throws IOException {
return super.getContentType();
}
protected void postPassivate() throws IOException {
this.removeAttribute("pdfdocmanager.docattributes.PDFDocument");
this.removeAttribute("pdfdocmanager.docattributes.PDFSaveOptions");
}
}