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;
 }
 public override ByteBuffer asReadOnlyBuffer()
 {
     return(ReadOnlyHeapByteBuffer.copy(this, markJ));
 }
 public override ByteBuffer slice()
 {
     ReadOnlyHeapByteBuffer slice = new ReadOnlyHeapByteBuffer(backingArray,
         remaining(), offset + positionJ);
     slice.orderJ = orderJ;
     return slice;
 }