src/share/classes/java/nio/Direct-X-Buffer.java

Print this page

        

*** 410,423 **** pos = (pos <= lim ? pos : lim); int len = lim - pos; if ((start < 0) || (end > len) || (start > end)) throw new IndexOutOfBoundsException(); ! int sublen = end - start; ! int off = (pos + start) << $LG_BYTES_PER_VALUE$; ! assert (off >= 0); ! return new DirectCharBuffer$RW$$BO$(this, -1, 0, sublen, sublen, off); } #end[char] --- 410,425 ---- pos = (pos <= lim ? pos : lim); int len = lim - pos; if ((start < 0) || (end > len) || (start > end)) throw new IndexOutOfBoundsException(); ! return new DirectCharBuffer$RW$$BO$(this, ! -1, ! pos + start, ! pos + end, ! capacity(), ! offset); } #end[char]