Java tutorial
//package com.java2s; import java.net.DatagramPacket; public class Main { private static DatagramPacket getRequestPacket() { String request = "00002"; byte[] start_request_array = request.getBytes(); DatagramPacket request_packet = new DatagramPacket(start_request_array, start_request_array.length); return request_packet; } }