code: public static byte[] copyToBytes(MemorySegment[] segments, int offset, int numBytes) {
  		return copyToBytes(segments, offset, new byte[numBytes], 0, numBytes);
  	}
docs: Copy segments to a new byte[].
  
  @param segments Source segments.
  @param offset Source segments offset.
  @param numBytes the number bytes to copy.