8220585: Incorrect code in MulticastSocket sample code

Sample code shows that String.length() can be passed to a DatagramPacket along with String.getBytes(), but is incorrect for non-ASCII Strings.

Reviewed-by: martin, chegar
1 file changed