Exemplo n.º 1
0
 internal static ReadOnlyHeapByteBuffer copy(HeapByteBuffer other, int markOfOther)
 {
     ReadOnlyHeapByteBuffer buf = new ReadOnlyHeapByteBuffer(
         other.backingArray, other.capacity(), other.offset);
     buf.limitJ = other.limit();
     buf.positionJ = other.position();
     buf.markJ = markOfOther;
     buf.order(other.order());
     return buf;
 }
Exemplo n.º 2
0
 public override ByteBuffer asReadOnlyBuffer()
 {
     return(ReadOnlyHeapByteBuffer.copy(this, markJ));
 }
Exemplo n.º 3
0
 public override ByteBuffer slice()
 {
     ReadOnlyHeapByteBuffer slice = new ReadOnlyHeapByteBuffer(backingArray,
         remaining(), offset + positionJ);
     slice.orderJ = orderJ;
     return slice;
 }