private void init() throws IOException { int magic2 = this.in.read(); if (magic2 != 'h') { throw new IOException("Stream is not BZip2 formatted: expected 'h'" + " as first byte but got '" + (char) magic2 + "'"); } int blockSize = this.in.read(); if ((blockSize < '1') || (blockSize > '9')) { throw new IOException("Stream is not BZip2 formatted: illegal " + "blocksize " + (char) blockSize); } this.blockSize100k = blockSize - '0'; initBlock(); setupBlock(); }
private void init() throws IOException { int magic2 = this.in.read(); if (magic2 != 'h') { throw new IOException("Stream is not BZip2 formatted: expected 'h'" + " as first byte but got '" + (char) magic2 + "'"); } int blockSize = this.in.read(); if ((blockSize < '1') || (blockSize > '9')) { throw new IOException("Stream is not BZip2 formatted: illegal " + "blocksize " + (char) blockSize); } this.blockSize100k = blockSize - '0'; initBlock(); setupBlock(); }
private void setupNoRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suCh2 = suCh2Shadow; this.suTPos = this.data.tt[this.suTPos]; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = NO_RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { this.currentState = NO_RAND_PART_A_STATE; endBlock(); initBlock(); setupBlock(); } }
private void setupNoRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suCh2 = suCh2Shadow; this.suTPos = this.data.tt[this.suTPos]; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = NO_RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { this.currentState = NO_RAND_PART_A_STATE; endBlock(); initBlock(); setupBlock(); } }
private void setupRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suTPos = this.data.tt[this.suTPos]; if (this.suRNToGo == 0) { this.suRNToGo = R_NUMS[this.suRTPos] - 1; if (++this.suRTPos == 512) this.suRTPos = 0; } else this.suRNToGo--; this.suCh2 = suCh2Shadow ^= (this.suRNToGo == 1) ? 1 : 0; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { endBlock(); initBlock(); setupBlock(); } }
private void setupRandPartA() throws IOException { if (this.suI2 <= this.last) { this.suChPrev = this.suCh2; int suCh2Shadow = this.data.ll8[this.suTPos] & 0xff; this.suTPos = this.data.tt[this.suTPos]; if (this.suRNToGo == 0) { this.suRNToGo = R_NUMS[this.suRTPos] - 1; if (++this.suRTPos == 512) this.suRTPos = 0; } else this.suRNToGo--; this.suCh2 = suCh2Shadow ^= (this.suRNToGo == 1) ? 1 : 0; this.suI2++; this.currentChar = suCh2Shadow; this.currentState = RAND_PART_B_STATE; this.crc.updateCRC(suCh2Shadow); } else { endBlock(); initBlock(); setupBlock(); } }