Core Java
-
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 » -
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 » -
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 » -
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 » -
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 » -
Convert Between Character Set Encodings with CharBuffer
In this example we shall show you how to convert between character set encodings with a CharBuffer in Java. To…
Read More » -
Convert String to byte array UTF encoding
With this example we are going to demonstrate how to convert a String to byte array and vice-versa using the…
Read More » -
Create Stream from FileChannel
This is an example of how to create input and output streams to read and write data from/to a file…
Read More » -
Write to Channel with ByteBuffer
With this example we are going to demonstrate how to write data to a NIO Channel using a ByteBuffer in…
Read More » -
Read from Channel with ByteBuffer
This is an example of how to read data from a NIO Channel using a ByteBuffer in Java. In particular…
Read More »