*/
public Packet read(final RecordLocation l) throws IOException, InvalidRecordLocationException {
final Location location = (Location) l;
// Run this in the queued executor thread.
try {
final FutureTask result = new FutureTask(new Callable() {
public Object call() throws Exception {
return file.readPacket(location);
}});
executor.execute(result);
return (Packet) result.get();
} catch (InterruptedException e) {
throw (IOException) new IOException("Interrupted.").initCause(e);
}
catch (ExecutionException e) {
throw handleExecutionException(e);