public ByteBuffer next() {if(nextBlock == POIFSConstants.END_OF_CHAIN) {throw new IndexOutOfBoundsException("Can't read past the end of the stream");}try {loopDetector.claim(nextBlock);ByteBuffer data = blockStore.getBlockAt(nextBlock);nextBlock = blockStore.getNextBlock(nextBlock);return data;} catch(IOException e) {throw new RuntimeException(e);}}

public ByteBuffer Next(){if (nextBlock == POIFSConstants.END_OF_CHAIN){throw new IndexOutOfRangeException("Can't read past the end of the stream");}try{loopDetector.Claim(nextBlock);ByteBuffer data = pStream.blockStore.GetBlockAt(nextBlock);nextBlock = pStream.blockStore.GetNextBlock(nextBlock);return data;}catch (IOException e){throw new RuntimeException(e.Message);}}
