@Override public URI[] listUris() throws Exception { FileInputStream fis = new FileInputStream(this.file); long fileSize = this.file.length(); if (fileSize < 4) { fis.close(); return new URI[0]; } DataInputStream in = new DataInputStream(new BufferedInputStream(fis)); List<URI> ls = new ArrayList<URI>(); try { while (true) { int n = in.readInt(); byte[] uriBytes = new byte[n]; URI storedUri = StorageUtil.readUriBytes(in, n, uriBytes); ls.add(storedUri); int sizeOfValue = in.readInt(); StorageUtil.skip(in, sizeOfValue); } } catch (EOFException ex) { return ls.toArray(new URI[0]); } }