+// Copyright (C) 2003 Adam Megacz <adam@xwt.org> all rights reserved.
+//
+// You may modify, copy, and redistribute this code under the terms of
+// the GNU Library Public License version 2.1, with the exception of
+// the portion of clause 6a after the semicolon (aka the "obnoxious
+// relink clause")
+
package org.xwt.util;
import java.io.*;
this.diskCache = diskCache;
}
public InputStream getInputStream() throws IOException {
- System.out.println("diskCache == " + diskCache);
- System.out.println("diskCache.exists() == " + diskCache.exists());
if (diskCache != null && diskCache.exists()) return new FileInputStream(diskCache);
return new SubStream();
}
// FIXME: probably a race here
if (diskCache != null && !diskCache.exists())
try {
- File cacheFile = new File(diskCache + ".tmp");
+ File cacheFile = new File(diskCache + ".incomplete");
FileOutputStream cacheFileStream = new FileOutputStream(cacheFile);
cacheFileStream.write(cache, 0, size);
cacheFileStream.close();
cacheFile.renameTo(diskCache);
} catch (IOException e) {
- Log.log(this, "exception thrown while writing disk cache");
- Log.log(this, e);
+ Log.info(this, "exception thrown while writing disk cache");
+ Log.info(this, e);
}
}
else size += ret;