Note that the simpler idiom (which also converts more cleanly to Java 7 syntax) is

```
InputStream inputStream = new FileInputStream(file);
try {
    return IOUtils.toByteArray(inputStream);
} finally {
    inputStream.close();
}
```