30 * <p>
31 * Datagram packets are used to implement a connectionless packet
32 * delivery service. Each message is routed from one machine to
33 * another based solely on information contained within that packet.
34 * Multiple packets sent from one machine to another might be routed
35 * differently, and might arrive in any order. Packet delivery is
36 * not guaranteed.
37 *
38 * @author Pavani Diwanji
39 * @author Benjamin Renaud
40 * @since 1.0
41 */
42 public final
43 class DatagramPacket {
44
45 /**
46 * Perform class initialization
47 */
48 static {
49 java.security.AccessController.doPrivileged(
50 new java.security.PrivilegedAction<Void>() {
51 public Void run() {
52 System.loadLibrary("net");
53 return null;
54 }
55 });
56 init();
57 }
58
59 /*
60 * The fields of this class are package-private since DatagramSocketImpl
61 * classes needs to access them.
62 */
63 byte[] buf;
64 int offset;
65 int length;
66 int bufLength;
67 InetAddress address;
68 int port;
69
70 /**
|
30 * <p>
31 * Datagram packets are used to implement a connectionless packet
32 * delivery service. Each message is routed from one machine to
33 * another based solely on information contained within that packet.
34 * Multiple packets sent from one machine to another might be routed
35 * differently, and might arrive in any order. Packet delivery is
36 * not guaranteed.
37 *
38 * @author Pavani Diwanji
39 * @author Benjamin Renaud
40 * @since 1.0
41 */
42 public final
43 class DatagramPacket {
44
45 /**
46 * Perform class initialization
47 */
48 static {
49 java.security.AccessController.doPrivileged(
50 new java.security.PrivilegedAction<>() {
51 public Void run() {
52 System.loadLibrary("net");
53 return null;
54 }
55 });
56 init();
57 }
58
59 /*
60 * The fields of this class are package-private since DatagramSocketImpl
61 * classes needs to access them.
62 */
63 byte[] buf;
64 int offset;
65 int length;
66 int bufLength;
67 InetAddress address;
68 int port;
69
70 /**
|