ResourceCleanupTask.java
1.4 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.io.ByteReader
* org.slf4j.Logger
*/
package com.adobe.pdfg.postprocess;
import com.adobe.internal.io.ByteReader;
import java.io.File;
import java.io.IOException;
import org.slf4j.Logger;
class ResourceCleanupTask
implements Runnable {
String m_filepath = null;
ByteReader m_reader = null;
ByteReader m_attachmentReader = null;
Logger m_logger = null;
ResourceCleanupTask(String filepath, ByteReader reader, ByteReader attachmentReader, Logger logger) {
this.m_filepath = filepath;
this.m_reader = reader;
this.m_attachmentReader = attachmentReader;
this.m_logger = logger;
}
public void run() {
try {
if (this.m_attachmentReader != null) {
this.m_attachmentReader.close();
}
}
catch (IOException e) {
this.m_logger.debug("IO error while closing attachment stream", (Throwable)e);
}
try {
if (this.m_reader != null) {
this.m_reader.close();
}
}
catch (IOException e) {
this.m_logger.debug("IO error while closing document reader stream", (Throwable)e);
}
if (this.m_filepath != null) {
File toDelete = new File(this.m_filepath);
toDelete.delete();
}
}
}