} catch (BTreeException e) {
throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
} catch (IOException e) {
throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
} finally {
lock.release(Lock.READ_LOCK);
}
}
private short getId(String name) throws EXistException, LockException {
byte[] key = new byte[1 + UTF8.encoded(name)];