/** Skips to the first segment of the next block, if any. In such case, it returns true, or false * otherwise. */ public void nextBlock() throws IOException { if ( ! hasMoreBlocks() ) throw new NoSuchElementException(); currentBlock++; if ( DEBUG ) LOGGER.debug( "Moving to block # " + currentBlock ); nextSegment(); }
/** Skips to the first segment of the next block, if any. In such case, it returns true, or false * otherwise. */ public void nextBlock() throws IOException { if (! hasMoreBlocks()) throw new NoSuchElementException(); currentBlock++; if (DEBUG) LOGGER.debug("Moving to block # " + currentBlock); nextSegment(); }
/** Skips to the first segment of the next block, if any. In such case, it returns true, or false * otherwise. */ public void nextBlock() throws IOException { if ( ! hasMoreBlocks() ) throw new NoSuchElementException(); currentBlock++; if ( DEBUG ) LOGGER.debug( "Moving to block # " + currentBlock ); nextSegment(); }
/** Skips to the next block, closing this segmented input stream if there are no more blocks. */ @Override public void close() throws IOException { ensureBlocksNotEmpty(); if (closed) return; if (hasMoreBlocks()) { nextBlock(); return; } if (DEBUG) LOGGER.debug("Closing the underlying input stream of this segmented input stream"); closed = true; in.close(); }
/** Skips to the next block, closing this segmented input stream if there are no more blocks. */ public void close() throws IOException { ensureBlocksNotEmpty(); if ( closed ) return; if ( hasMoreBlocks() ) { nextBlock(); return; } if ( DEBUG ) LOGGER.debug( "Closing the underlying input stream of this segmented input stream" ); closed = true; in.close(); }
/** Skips to the next block, closing this segmented input stream if there are no more blocks. */ public void close() throws IOException { ensureBlocksNotEmpty(); if ( closed ) return; if ( hasMoreBlocks() ) { nextBlock(); return; } if ( DEBUG ) LOGGER.debug( "Closing the underlying input stream of this segmented input stream" ); closed = true; in.close(); }
public Document nextDocument() throws IOException { /* If necessary, skip to the next segment, else, try skipping to the next gzip file. */ if ( DEBUG ) LOGGER.debug( "nextDocument() has been called " ); if ( last != null ) { last.close(); if ( ! siStream.hasMoreBlocks() ) { if ( ! nextFile() ) return last = null; } else siStream.nextBlock(); } else if ( ! nextFile() ) return null; // First call return last = factory.getDocument( siStream, metadata( currentDocument++ ) ); }
public Document nextDocument() throws IOException { /* If necessary, skip to the next segment, else, try skipping to the next gzip file. */ if ( DEBUG ) LOGGER.debug( "nextDocument() has been called " ); if ( last != null ) { last.close(); if ( ! siStream.hasMoreBlocks() ) { if ( ! nextFile() ) return last = null; } else siStream.nextBlock(); } else if ( ! nextFile() ) return null; // First call return last = factory.getDocument( siStream, metadata( currentDocument++ ) ); }
public Document nextDocument() throws IOException { /* If necessary, skip to the next segment, else, try skipping to the next gzip file. */ if ( DEBUG ) LOGGER.debug( "nextDocument() has been called " ); if ( last != null ) { last.close(); if ( ! siStream.hasMoreBlocks() ) { if ( ! nextFile() ) return last = null; } else siStream.nextBlock(); } else if ( ! nextFile() ) return null; // First call return last = factory.getDocument( siStream, metadata( currentDocument++ ) ); }
public Document nextDocument() throws IOException { /* If necessary, skip to the next segment, else, try skipping to the next gzip file. */ if ( DEBUG ) LOGGER.debug( "nextDocument() has been called " ); if ( last != null ) { last.close(); if ( ! siStream.hasMoreBlocks() ) { if ( ! nextFile() ) return last = null; } else siStream.nextBlock(); } else if ( ! nextFile() ) return null; // First call return last = factory.getDocument( siStream, metadata( currentDocument++ ) ); }