openmicroscopy/bioformats — pull request #1292 by sbesson (2014-08-27 08:12:31+00:00)
Title: Memoizer: improve usability of in-place caching

Follow-up of #1285, this PR:
- adds a new constructor for performance in-place memo caching:

```
memoizer = new Memoizer(reader, 0, true);
```
The `Memoizer` interface no has an extra boolean attribute `doInPlaceCaching` which allows to override the `directory` `File` attribute if set to `true`.
- modifies `getMemoFile(id)` to support the `doInPlaceCaching` attribute
- add check for write permissions when doing in-place caching
- adds tests corresponding to the features described above. Note all tests under `MemoizerTest` now create a fake file during `setUp` under a unique directory of `java.io.tmpdir` (which permissions can easily be manipulated for test purposes).

/cc @bpindelski

--no-rebase