static ReadWriteHeapByteBuffer copy(HeapByteBuffer other, int markOfOther) { ReadWriteHeapByteBuffer buf = new ReadWriteHeapByteBuffer( other.backingArray, other.capacity(), other.offset); buf.limitJ = other.limit(); buf.positionJ = other.position(); buf.markJ = markOfOther; buf.order(other.order()); return(buf); }
static ReadWriteHeapByteBuffer copy(HeapByteBuffer other, int markOfOther) { ReadWriteHeapByteBuffer buf = new ReadWriteHeapByteBuffer( other.backingArray, other.capacity(), other.offset); buf.limitJ = other.limit(); buf.positionJ = other.position(); buf.markJ = markOfOther; buf.order(other.order()); return buf; }