net
-
InetAddress
Get hostname from IP address
This is an example of how to get the host name of a remote host from its IP address. Doing…
Read More » -
InetAddress
Get IP address and hostname from local machine
In this example we shall show you how to retrieve the IP address and hostname from the local host. To…
Read More » -
InetAddress
Get IP address from hostname
In this example we shall show you how to retrieve the IP address from the hostname of a specific host.…
Read More » -
DatagramPacket
Send network DatagramPacket
This is an example of how to send a Datagram packet over the network in Java. Sending Datagram packets between…
Read More » -
DatagramPacket
Receive network DatagramPacket
In this example we shall show you how to receive a Datagram packet in Java. For a host to receive…
Read More » -
URLConnection
Get response headers from HTTP request
With this example we are going to demonstrate how to get response headers from an HTTP request in Java. In…
Read More » -
URLConnection
Send cookie with HTTP request
This is an example of how to send a cookie with an HTTP request in Java. In short, to send…
Read More » -
URLConnection
Get cookies from HTTP connection
With this example we are going to demonstrate how to get cookies from an HTTP connection in Java. In short,…
Read More »