@Override public synchronized void close() { if (fbis == null) return; try { fbis.close(); } catch (final IOException e) { throw new RuntimeException(e); } finally { fbis = null; } }
@Override public synchronized void close() { if (inputStream == null) throw new IllegalStateException(); try { inputStream.close(); } catch (final IOException e) { throw new RuntimeException(e); } finally { inputStream = null; } }
@Override public synchronized void close() { if (inputStream == null) throw new IllegalStateException(); try { inputStream.close(); } catch (final IOException e) { throw new RuntimeException(e); } finally { inputStream = null; } }
public void close() throws IOException { super.close(); if( fbis != null ) { fbis.close(); fbis = null; } }
public void close() throws IOException { super.close(); if( fbis != null ) { fbis.close(); fbis = null; } }
public void close() throws IOException { super.close(); if( fbis != null ) { fbis.close(); fbis = null; } }
public void close() throws IOException { super.close(); if( fbis != null ) { fbis.close(); fbis = null; } }
public void close() throws IOException { if ( ! eod ) while( read() != -1 ); super.close(); }
public void close() throws IOException { if ( ! eod ) while( read() != -1 ); super.close(); }
public void close() throws IOException { if ( ! eof ) while( read() != -1 ); super.close(); }
public void close() throws IOException { if ( ! eof ) while( read() != -1 ); super.close(); }
public Document nextDocument() throws IOException { if ( index == size ) return null; if ( index == firstDocument[ f + 1 ] ) { fbis.close(); fbis = new FastBufferedInputStream( new FileInputStream( file[ ++f ] ) ); } readDocument( index, f, fbis ); return document( index++ ); } };
public Document nextDocument() throws IOException { if ( index == size ) return null; if ( index == firstDocument[ f + 1 ] ) { fbis.close(); fbis = new FastBufferedInputStream( new FileInputStream( file[ ++f ] ) ); } readDocument( index, f, fbis ); return document( index++ ); } };
public Document nextDocument() throws IOException { if ( index == size ) return null; if ( index == firstDocument[ f + 1 ] ) { fbis.close(); fbis = new FastBufferedInputStream( new FileInputStream( file[ ++f ] ) ); } readDocument( index, f, fbis ); return document( index++ ); } };
public Document nextDocument() throws IOException { if ( index == size ) return null; if ( index == firstDocument[ f + 1 ] ) { fbis.close(); fbis = new FastBufferedInputStream( new FileInputStream( file[ ++f ] ) ); } readDocument( index, f, fbis ); return document( index++ ); } };
public void close() throws IOException { if ( cache != 0 ) writeOutCache( -1 ); bitsForListsWithTowers += obs.writtenBits() - lastInvertedListPos; super.close(); cacheDataIn.close(); cacheDataOut.close(); tempFile.delete(); if ( STATS ) { pointerSkipStats.close(); pointerTopSkipStats.close(); bitSkipStats.close(); bitTopSkipStats.close(); } }
public void close() throws IOException { if ( cache != 0 ) writeOutCache( -1 ); bitsForListsWithTowers += obs.writtenBits() - lastInvertedListPos; super.close(); cacheDataIn.close(); cacheDataOut.close(); tempFile.delete(); if ( STATS ) { pointerSkipStats.close(); pointerTopSkipStats.close(); bitSkipStats.close(); bitTopSkipStats.close(); } }
public void close() throws IOException { if ( cache != 0 ) writeOutCache( -1 ); bitsForListsWithTowers += obs.writtenBits() - lastInvertedListPos; super.close(); cacheDataIn.close(); cacheDataOut.close(); tempFile.delete(); if ( STATS ) { pointerSkipStats.close(); pointerTopSkipStats.close(); bitSkipStats.close(); bitTopSkipStats.close(); } }
public void close() throws IOException { if ( cache != 0 ) writeOutCache( -1 ); bitsForListsWithTowers += obs.writtenBits() - lastInvertedListPos; super.close(); cacheDataIn.close(); cacheDataOut.close(); tempFile.delete(); if ( STATS ) { pointerSkipStats.close(); pointerTopSkipStats.close(); bitSkipStats.close(); bitTopSkipStats.close(); } }
public void close() throws IOException { if ( cache != 0 ) writeOutCache( -1 ); if ( state != BEFORE_DOCUMENT_RECORD && state != BEFORE_INVERTED_LIST ) throw new IllegalStateException( "Trying to close index in state " + state ); if ( frequency >= 0 && frequency != writtenDocuments ) throw new IllegalStateException( "The number of document records (" + this.writtenDocuments + ") does not match the frequency (" + this.frequency + ")" ); if ( writtenBits() != obs.writtenBits() + positions.writtenBits() ) throw new IllegalStateException( "Written bits count mismatch: we say " + writtenBits() + ", the streams say " + ( obs.writtenBits() + positions.writtenBits() ) ); bitsForListsWithTowers += ( obs.writtenBits() - lastInvertedListPos ) + ( positions.writtenBits() - lastPositionsOffset ); if ( offsets != null ) { offsets.writeLongGamma( obs.writtenBits() - lastInvertedListPos ); offsets.close(); } if ( posNumBits != null ) { posNumBits.writeLongGamma( positions.writtenBits() - lastPositionsOffset ); posNumBits.close(); } obs.close(); positions.close(); cacheDataIn.close(); cacheDataOut.close(); tempFile.delete(); }