IntViewBufferImpl(ByteBuffer bb, int capacity) { super(capacity, capacity, 0, -1); this.bb = bb; this.offset = bb.position(); this.readOnly = bb.isReadOnly(); this.endian = bb.order(); if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset); }
public IntViewBufferImpl( ByteBuffer bb, int offset, int capacity, int limit, int position, int mark, boolean readOnly, ByteOrder endian) { super(capacity, limit, position, mark); this.bb = bb; this.offset = offset; this.readOnly = readOnly; this.endian = endian; if (bb.isDirect()) this.address = VMDirectByteBuffer.adjustAddress(bb.address, offset); }