src/java.base/share/classes/java/nio/ByteBufferAs-X-Buffer.java.template
changeset 54129 deb99f13c6cd
parent 53959 1542e63eb537
child 54151 d2f8b7b33013
equal deleted inserted replaced
54128:c0fccca69aff 54129:deb99f13c6cd
    85         return new ByteBufferAs$Type$Buffer$RW$$BO$(bb, -1, 0, rem, rem, addr);
    85         return new ByteBufferAs$Type$Buffer$RW$$BO$(bb, -1, 0, rem, rem, addr);
    86     }
    86     }
    87 
    87 
    88     @Override
    88     @Override
    89     public $Type$Buffer slice(int index, int length) {
    89     public $Type$Buffer slice(int index, int length) {
    90         Objects.checkIndex(index, limit() + 1);
    90         Objects.checkFromIndexSize(index, length, limit());
    91         Objects.checkIndex(length, limit() - index + 1);
       
    92         return new ByteBufferAs$Type$Buffer$RW$$BO$(bb,
    91         return new ByteBufferAs$Type$Buffer$RW$$BO$(bb,
    93                                                     -1,
    92                                                     -1,
    94                                                     0,
    93                                                     0,
    95                                                     length,
    94                                                     length,
    96                                                     length,
    95                                                     length,