This practical guide provides a complete introduction to developing network programs with Java. You’ll learn how to use Java’s network class library to quickly and easily accomplish common networking tasks such as writing multithreaded servers, encrypting communications, broadcasting to the local network, and posting data to server-side programs.
Author Elliotte Rusty Harold provides complete working programs to illustrate the methods and classes he describes. This thoroughly revised fourth edition covers REST, SPDY, asynchronous I/O, and many other recent technologies.
Explore protocols that underlie the Internet, such as TCP/IP and UDP/IP
Learn how Java’s core I/O API handles network input and output
Discover how the InetAddress class helps Java programs interact with DNS
Locate, identify, and download network resources with Java’s URI and URL classes
Dive deep into the HTTP protocol, including REST, HTTP headers, and cookies
Write servers and network clients, using Java’s low-level socket classes
Manage many connections at the same time with the nonblocking I/O
Chapter 1 Basic Network Concepts
The Layers of a Network
IP, TCP, and UDP
The Client/Server Model
Chapter 2 Streams
Readers and Writers
Chapter 3 Threads
Returning Information from a Thread
Thread Pools and Executors
Chapter 4 Internet Addresses
The InetAddress Class
Inet4Address and Inet6Address
The NetworkInterface Class
Some Useful Programs
Chapter 5 URLs and URIs
The URL Class
The URI Class
Communicating with Server-Side Programs Through GET
Elliotte Rusty Harold is originally from New Orleans to which he returns periodically in search of a decent bowl of gumbo. However, he currently resides in the Prospect Heights neighborhood of Brooklyn with his wife Beth and dog Thor. He's a frequent speaker at industry conferences including Software Development, Dr. Dobb's Architecture & Design World, SD Best Practices, Extreme Markup Languages, and too many user groups to count. His open source projects include the XOM Library for processing XML with Java and the Amateur media player.
The animal on the cover of Java Network Programming, Fourth Edition, is a NorthAmerican river otter (Lutra canadensis). These small carnivores are found in all majorwaterways of the United States and Canada, and in almost every habitat except thetundra and the hot, dry regions of the southwestern United States. They weigh about20 pounds and are approximately two and a half feet long, and females tend to be abouta third smaller than males. Their diet consists mainly of aquatic animals like fish andfrogs, but since they spend about two-thirds of their time on land, they also eat theoccasional bird or rodent. Two layers of fur—a coarse outer coat and a thick, dense innercoat—protect a river otter from the cold, and, in fact, they seem to enjoy playing in snowand ice. When diving, a river otter’s pulse rate slows to only 20 beats per minute fromits normal 170, conserving oxygen and allowing the otter to stay underwater longer.These animals are sociable and domesticated easily, and in Europe, a related species wasonce trained to catch fish for people to eat.
Comments about oreilly Java Network Programming, 4th Edition:
Wisely divided in 13 main parts, reviewing transversely all the networking API (and more).
Starting from basic networking concepts, including information about NIO, Asynchronous Channels, Socket Options (Java 7), until IP Multicasting. Author mentions that Java Networking API is stable since version 1.0 and we shouldn't have any issue after Java 8 is released, anyway as we know, always these future assumptions must be taken carefully about any migration.
Being the 4th edition, it is certainly a proved book, with mature information about the networking scope.
Very detailed information on its coding examples, regarding the interfaces, constructors, direct/undirected classes, event handlers, exception handling, and their respective methods. At the end, explain how this complex API can be used in the expected/correct fashion.
Similar to the new (2nd) edition of Java Web Services book, there is an emphasis on the current de-facto REST standard.
Kind of bible, reference and cookbook of networking Java, responding all the most common doubts (and some very peculiar). for the beginner and advanced developer, well redacted.
Although there are a lot of snippet code in the book, the complete examples can be downloaded from author's website.
Bottom Line Yes, I would recommend this to a friend