Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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;
 }