Java was developed initially as a language that would control a network of interactive consumer devices. Connecting machines was one of the main purposes of the language when it was designed, and that remains true today.
java.net package makes it possible to communicate over a network, providing cross-platform abstractions to make connections, transfer files using common web protocols, and create sockets.
Used in conjunction with input and output streams, reading and writing files over the network becomes as easy as reading or writing files on disk.
java.nio package expands Java’s input and output classes.
Today, you write networking Java programs, creating applications that load a document over ...