code: public static ByteBuf wrappedBuffer(byte[] array, int offset, int length) {
          if (length == 0) {
              return EMPTY_BUFFER;
          }
  
          if (offset == 0 && length == array.length) {
              return wrappedBuffer(array);
          }
  
          return wrappedBuffer(array).slice(offset, length);
      }
docs: Creates a new big-endian buffer which wraps the sub-region of the
  specified {@code array}.  A modification on the specified array's
  content will be visible to the returned buffer.