/** Adds a new block defined by its array of segment delimiters. * * <p>The block has length defined by the difference between the last and first * delimiter. * * <p>This method performs the initial call to {@link #nextBlock()} when the first marker * is put in. * * @param delimiter a list of segment delimiters. * @throws IllegalArgumentException if the elements of <code>delimiter</code> are negative or not increasing. */ public void addBlock( final long... delimiter ) throws IllegalArgumentException, IOException { ensureNotClosed(); blocks.add( new SegmentBlock( delimiter ) ); if ( DEBUG ) LOGGER.debug( "Adding a new block with delimiters " + Arrays.toString( delimiter ) ); if ( currentBlock == -1 ) nextBlock(); }
/** Adds a new block defined by its array of segment delimiters. * * <p>The block has length defined by the difference between the last and first * delimiter. * * <p>This method performs the initial call to {@link #nextBlock()} when the first marker * is put in. * * @param delimiter a list of segment delimiters. * @throws IllegalArgumentException if the elements of <code>delimiter</code> are negative or not increasing. */ public void addBlock(final long... delimiter) throws IllegalArgumentException, IOException { ensureNotClosed(); blocks.add(new SegmentBlock(delimiter)); if (DEBUG) LOGGER.debug("Adding a new block with delimiters " + Arrays.toString(delimiter)); if (currentBlock == -1) nextBlock(); }
/** Adds a new block defined by its array of segment delimiters. * * <p>The block has length defined by the difference between the last and first * delimiter. * * <p>This method performs the initial call to {@link #nextBlock()} when the first marker * is put in. * * @param delimiter a list of segment delimiters. * @throws IllegalArgumentException if the elements of <code>delimiter</code> are negative or not increasing. */ public void addBlock( final long... delimiter ) throws IllegalArgumentException, IOException { ensureNotClosed(); blocks.add( new SegmentBlock( delimiter ) ); if ( DEBUG ) LOGGER.debug( "Adding a new block with delimiters " + Arrays.toString( delimiter ) ); if ( currentBlock == -1 ) nextBlock(); }