/** * Creates a bitmap with the specified java.nio.IntBuffer backend. * The content of the IntBuffer is discarded. * * @param buffer data source */ public EWAHCompressedBitmap32(IntBuffer buffer) { this(new IntBufferWrapper(buffer)); }
/** * Creates a bitmap with the specified java.nio.IntBuffer backend. * The content of the IntBuffer is discarded. * * @param buffer data source */ public EWAHCompressedBitmap32(IntBuffer buffer) { this(new IntBufferWrapper(buffer)); }
@Override public IntBufferWrapper clone() throws CloneNotSupportedException { return new IntBufferWrapper(this.buffer, this.actualSizeInWords); }
@Override public IntBufferWrapper clone() throws CloneNotSupportedException { return new IntBufferWrapper(this.buffer, this.actualSizeInWords); }
/** * Creates a bitmap with the specified ByteBuffer backend. It assumes * that a bitmap was serialized at this location. It is effectively "deserialized" * though the actual content is not copied. * This might be useful for implementing memory-mapped bitmaps. * * @param buffer data source */ public EWAHCompressedBitmap32(ByteBuffer buffer) { IntBuffer ib = buffer.asIntBuffer(); this.sizeInBits = ib.get(0); int sizeInWords = ib.get(1); int rlwposition = ib.get(2 + sizeInWords); ib.position(2); this.buffer = new IntBufferWrapper(ib.slice(), sizeInWords); this.rlw = new RunningLengthWord32(this.buffer, rlwposition); }
/** * Creates a bitmap with the specified ByteBuffer backend. It assumes * that a bitmap was serialized at this location. It is effectively "deserialized" * though the actual content is not copied. * This might be useful for implementing memory-mapped bitmaps. * * @param buffer data source */ public EWAHCompressedBitmap32(ByteBuffer buffer) { IntBuffer ib = buffer.asIntBuffer(); this.sizeInBits = ib.get(0); int sizeInWords = ib.get(1); int rlwposition = ib.get(2 + sizeInWords); ib.position(2); this.buffer = new IntBufferWrapper(ib.slice(), sizeInWords); this.rlw = new RunningLengthWord32(this.buffer, rlwposition); }