import java.net.URL;
import java.util.Date;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
+
/**
* A generic cache system, with special support for {@link URL}s.
* <p>
* in case of I/O error
*/
private void save(InputStream in, File cached) throws IOException {
- clean(true, dir, 10);
+ // We delete AFTER so not to remove the subdir we will use...
IOUtils.write(in, cached);
+ clean(true, dir, 10);
}
/**