Cleanup Code

This commit is contained in:
tarsin committed 2022-12-04 18:23:15 +08:00
1 parent a59fbcc9c8
commit 8f36cecc7a
22 files changed
+52 -1193

No files matched your search

@@ -246,6 +246,10 @@ public final class DiskLruCache implements Closeable {
if (!from.renameTo(to)) {
throw new IOException();
}
}
private static String inputStreamToString(InputStream in) throws IOException {
return Util.readFully(new InputStreamReader(in, Util.UTF_8));
} private final Callable<Void> cleanupCallable = new Callable<>() {
public Void call() throws Exception {
synchronized (DiskLruCache.this) {
@@ -262,10 +266,6 @@ public final class DiskLruCache implements Closeable {
}
};
private static String inputStreamToString(InputStream in) throws IOException {
return Util.readFully(new InputStreamReader(in, Util.UTF_8));
}
private void readJournal() throws IOException {
StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
try {