public void setStream ( InputStream zStream ) { last = 0 ; origPtr = 0 ; blockSize100k = 0 ; blockRandomised = false ; bsBuff = 0 ; bsLive = 0 ; mCrc = new CRC ( ) ; nInUse = 0 ; bsStream = null ; streamEnd = false ; currentChar = - 1 ; currentState = START_BLOCK_STATE ; storedBlockCRC = storedCombinedCRC = 0 ; computedBlockCRC = computedCombinedCRC = 0 ; i2 = count = chPrev = ch2 = 0 ; i = tPos = 0 ; rNToGo = 0 ; rTPos = 0 ; j2 = 0 ; z = 0 ; bsSetStream ( zStream ) ; initialize ( ) ; if ( ! streamEnd ) { // Handle if initialize does not detect valid bz2 stream initBlock ( ) ; setupBlock ( ) ; } }
Added 5 - 30 - 2006 to allow for resetting of the input used by this object . This saves in memory allocation costs