code: public static byte[] copyToBytes(MemorySegment[] segments, int offset, byte[] bytes,
  			int bytesOffset, int numBytes) {
  		if (inFirstSegment(segments, offset, numBytes)) {
  			segments[0].get(offset, bytes, bytesOffset, numBytes);
  		} else {
  			copyMultiSegmentsToBytes(segments, offset, bytes, bytesOffset, numBytes);
  		}
  		return bytes;
  	}
docs: Copy segments to target byte[].
  
  @param segments Source segments.
  @param offset Source segments offset.
  @param bytes target byte[].
  @param bytesOffset target byte[] offset.
  @param numBytes the number bytes to copy.