// Fail if not found.
true);
new ReentrantReadWriteEntityLock<HashedFileObject>(hfo) {
@Override
public HashedFileObject transaction() throws Exception {
final DiskObject object = getCanonicalObject(repo, hfo);
// Validate that the object file exists on disk
// before we attempt to load it.
if(!object.getFile().exists()) {
throw new ObjectNotFoundException("Failed " +
"to find canonical object on disk " +
"(key=" + key + ", file=" +
object.getFile().getAbsolutePath() +
")");
}
streamHeaders(object, hfo, response);
streamObject(object, response);
return hfo;