com.pdfjet.BitBuffer Maven / Gradle / Ivy
/* */ package com.pdfjet;
/* */
/* */ class BitBuffer
/* */ {
/* */ private byte[] buffer;
/* */ private int length;
/* 26 */ private int increments = 32;
/* */
/* */ public BitBuffer()
/* */ {
/* 30 */ this.buffer = new byte[this.increments];
/* 31 */ this.length = 0;
/* */ }
/* */
/* */ public byte[] getBuffer() {
/* 35 */ return this.buffer;
/* */ }
/* */
/* */ public int getLengthInBits() {
/* 39 */ return this.length;
/* */ }
/* */
/* */ public void put(int paramInt1, int paramInt2) {
/* 43 */ for (int i = 0; i < paramInt2; i++)
/* 44 */ put((paramInt1 >>> paramInt2 - i - 1 & 0x1) == 1);
/* */ }
/* */
/* */ public void put(boolean paramBoolean)
/* */ {
/* 49 */ if (this.length == this.buffer.length * 8) {
/* 50 */ byte[] arrayOfByte = new byte[this.buffer.length + this.increments];
/* 51 */ System.arraycopy(this.buffer, 0, arrayOfByte, 0, this.buffer.length);
/* 52 */ this.buffer = arrayOfByte;
/* */ }
/* */
/* 55 */ if (paramBoolean)
/* */ {
/* */ int tmp63_62 = (this.length / 8);
/* */ byte[] tmp63_53 = this.buffer; tmp63_53[tmp63_62] = ((byte)(tmp63_53[tmp63_62] | 128 >>> this.length % 8));
/* */ }
/* */
/* 59 */ this.length += 1;
/* */ }
/* */ }
/* Location: E:\EGGWIFI\Customer\trunk\src\Workspace\Customer\Customer Maven Webapp\src\main\webapp\WEB-INF\lib\PDFjet.jar
* Qualified Name: com.pdfjet.BitBuffer
* JD-Core Version: 0.6.2
*/