// delete evt. blob
byte[] data = writeSmallBinary(out, val, state, i);
// replace value instance with value
// backed by resource in blob store and delete temp file
values[i] = InternalValue.create(data);
val.discard();
}
} catch (RepositoryException e) {
String msg = "Error while storing blob. id="
+ state.getId() + " idx=" + i + " value=" + val;
log.error(msg, e);