From: <bra...@us...> - 2010-03-20 01:03:00
|
Revision: 2987 http://archive-access.svn.sourceforge.net/archive-access/?rev=2987&view=rev Author: bradtofel Date: 2010-03-20 01:02:49 +0000 (Sat, 20 Mar 2010) Log Message: ----------- BUGFIX(unreported) now returns closeable iterators, so filehandles/sockets can be cleaned up.. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/flatfile/FlatFile.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/flatfile/FlatFile.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/flatfile/FlatFile.java 2010-03-20 01:00:50 UTC (rev 2986) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/flatfile/FlatFile.java 2010-03-20 01:02:49 UTC (rev 2987) @@ -180,7 +180,7 @@ * @return Iterator for records beggining with key * @throws IOException */ - public Iterator<String> getRecordIterator(final String prefix) throws IOException { + public CloseableIterator<String> getRecordIterator(final String prefix) throws IOException { RecordIterator itr = null; RandomAccessFile raf = new RandomAccessFile(file,"r"); long offset = findKeyOffset(raf,prefix); @@ -190,7 +190,7 @@ return itr; } - public Iterator<String> getRecordIteratorLT(final String prefix) throws IOException { + public CloseableIterator<String> getRecordIteratorLT(final String prefix) throws IOException { RecordIterator itr = null; RandomAccessFile raf = new RandomAccessFile(file,"r"); long offset = findKeyOffsetLT(raf,prefix); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |