head.put(null, key, data);
}
public void readNode(StoredNode node) throws NotFoundException, Exception {
Id id = node.getId();
DatabaseEntry key = new DatabaseEntry(id.getBytes());
DatabaseEntry data = new DatabaseEntry();
if (db.get(null, key, data, LockMode.DEFAULT) == OperationStatus.SUCCESS) {
ByteArrayInputStream in = new ByteArrayInputStream(data.getData());
node.deserialize(new BinaryBinding(in));
} else {
throw new NotFoundException(id.toString());
}
}