code: public static HeapBuffer wrap(byte[] bytes) {
      return new HeapBuffer(HeapBytes.wrap(bytes), 0, bytes.length, bytes.length);
    }
docs: Wraps the given bytes in a heap buffer.
  <p>
  The buffer will be created with an initial capacity and maximum capacity equal to the byte array count.
  
  @param bytes The bytes to wrap.
  @return The wrapped bytes.