public void next() throws IOException { streamOffset = getRecordOffset(); inputStream.close(); if (encodedInputStream != null && encodedInputStream.available() > 0) { Preconditions.checkState( blockCursor.getBlockType() == Constants.FIRST_LZMA_BLOCK || blockCursor.getBlockType() == Constants.NEXT_LZMA_BLOCK); resumeLzmaDecoder(); return; } encodedInputStream = null; blockCursor.next(); if (blockCursor.getBlockType() == Constants.NEXT_LZMA_BLOCK) { startLzmaDecoder(false); return; } initChunk(); }