ClsFileOutputStream.java
2.46 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package com.crashlytics.android.core;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
class ClsFileOutputStream
extends FileOutputStream
{
public static final String IN_PROGRESS_SESSION_FILE_EXTENSION = ".cls_temp";
public static final String SESSION_FILE_EXTENSION = ".cls";
public static final FilenameFilter TEMP_FILENAME_FILTER = new FilenameFilter()
{
public final boolean accept(File paramAnonymousFile, String paramAnonymousString)
{
return paramAnonymousString.endsWith(".cls_temp");
}
};
private boolean closed = false;
private File complete;
private File inProgress;
private final String root;
public ClsFileOutputStream(File paramFile, String paramString)
throws FileNotFoundException
{
super(new File(paramFile, paramString + ".cls_temp"));
this.root = (paramFile + File.separator + paramString);
this.inProgress = new File(this.root + ".cls_temp");
}
public ClsFileOutputStream(String paramString1, String paramString2)
throws FileNotFoundException
{
this(new File(paramString1), paramString2);
}
public void close()
throws IOException
{
File localFile;
try
{
boolean bool = this.closed;
if (bool) {}
for (;;)
{
return;
this.closed = true;
super.flush();
super.close();
localFile = new File(this.root + ".cls");
if (!this.inProgress.renameTo(localFile)) {
break;
}
this.inProgress = null;
this.complete = localFile;
}
str = "";
}
finally {}
String str;
if (localFile.exists()) {
str = " (target already exists)";
}
for (;;)
{
throw new IOException("Could not rename temp file: " + this.inProgress + " -> " + localFile + str);
if (!this.inProgress.exists()) {
str = " (source does not exist)";
}
}
}
public void closeInProgressStream()
throws IOException
{
if (this.closed) {
return;
}
this.closed = true;
super.flush();
super.close();
}
public File getCompleteFile()
{
return this.complete;
}
public File getInProgressFile()
{
return this.inProgress;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/crashlytics/android/core/ClsFileOutputStream.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/