ManagedSharedFileSourceHandler.java
1.31 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.aemfd.docmanager.source.AbstractSourceHandler
* com.adobe.aemfd.docmanager.source.FileBasedDocumentSourceHandler
*/
package com.adobe.aemfd.pdfdocmanager.internal.source;
import com.adobe.aemfd.docmanager.source.AbstractSourceHandler;
import com.adobe.aemfd.docmanager.source.FileBasedDocumentSourceHandler;
import com.adobe.aemfd.pdfdocmanager.internal.io.ManagedSharedFileBasedFilterByteWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class ManagedSharedFileSourceHandler
extends AbstractSourceHandler
implements FileBasedDocumentSourceHandler {
private ManagedSharedFileBasedFilterByteWriter byteWriter;
public ManagedSharedFileSourceHandler(ManagedSharedFileBasedFilterByteWriter byteWriter, String contentType) {
super(byteWriter.getSourceFile().length(), contentType);
this.byteWriter = byteWriter;
}
public InputStream getInputStream() throws IOException {
return new FileInputStream(this.byteWriter.getSourceFile());
}
protected void doDispose() {
this.byteWriter.dispose();
this.byteWriter = null;
}
public File getSourceFile() {
return this.byteWriter.getSourceFile();
}
}