return execute(file, new Callable<T>() {
public T call(RandomAccessFile file) throws IOException {
byte[] buffer = new byte[(int) file.length()];
file.readFully(buffer);
Properties props = new Properties();
props.load(new ByteArrayInputStream(buffer));
T result = callback.call(props);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
props.store(baos, null);
file.setLength(0);
file.write(baos.toByteArray());