quadTree = store.load(openIndexFile(shxURL)); } catch (IOException e) { throw new StoreException(e);
IndexFile shx = openIndexFile(); try {
IndexFile shx = openIndexFile(); try {
/** * Convenience method for opening a QuadTree index. * * @return A new QuadTree * * @throws StoreException */ protected QuadTree openQuadTree() throws StoreException { if (!isLocal()) { return null; } URL treeURL = shpFiles.acquireRead(QIX, this); try { File treeFile = DataUtilities.urlToFile(treeURL); if (!treeFile.exists() || (treeFile.length() == 0)) { treeType = IndexType.NONE; return null; } try { FileSystemIndexStore store = new FileSystemIndexStore(treeFile); return store.load(openIndexFile(), useMemoryMappedBuffer); } catch (IOException e) { throw new StoreException(e); } } finally { shpFiles.unlockRead(treeURL, this); } }
/** * Convenience method for opening a QuadTree index. * * @return A new QuadTree * * @throws StoreException */ protected QuadTree openQuadTree() throws StoreException { if (!isLocal()) { return null; } URL treeURL = shpFiles.acquireRead(QIX, this); try { File treeFile = DataUtilities.urlToFile(treeURL); if (!treeFile.exists() || (treeFile.length() == 0)) { treeType = IndexType.NONE; return null; } try { FileSystemIndexStore store = new FileSystemIndexStore(treeFile); return store.load(openIndexFile(), useMemoryMappedBuffer); } catch (IOException e) { throw new StoreException(e); } } finally { shpFiles.unlockRead(treeURL, this); } }
IndexFile shx = openIndexFile(shxURL); try {