code: @Override
    public final IoBuffer getSlice(int length) {
      if (length < 0) {
        throw new IllegalArgumentException("length: " + length);
      }
      int pos = position();
      int limit = limit();
      int nextPos = pos + length;
      if (limit < nextPos) {
        throw new IndexOutOfBoundsException(
            "position + length (" + nextPos + ") is greater " + "than limit (" + limit + ").");
      }
  
      limit(pos + length);
      IoBuffer slice = slice();
      position(nextPos);
      limit(limit);
      return slice;
    }
docs: {@inheritDoc}