Пример #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);
        }
Пример #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;
 }