Book description
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
Publisher resources
Table of contents
- Dedication
- Preface
- 1. Basic Network Concepts
- 2. Streams
- 3. Threads
- 4. Internet Addresses
- 5. URLs and URIs
- 6. HTTP
-
7. URLConnections
- Opening URLConnections
- Reading Data from a Server
- Reading the Header
- Caches
- Configuring the Connection
- Configuring the Client Request HTTP Header
- Writing Data to a Server
- Security Considerations for URLConnections
- Guessing MIME Media Types
- HttpURLConnection
- 8. Sockets for Clients
- 9. Sockets for Servers
- 10. Secure Sockets
- 11. Nonblocking I/O
-
12. UDP
- The UDP Protocol
- UDP Clients
- UDP Servers
- The DatagramPacket Class
-
The DatagramSocket Class
-
The Constructors
- public DatagramSocket() throws SocketException
- public DatagramSocket(int port) throws SocketException
- public DatagramSocket(int port, InetAddress interface) throws SocketException
- public DatagramSocket(SocketAddress interface) throws SocketException
- protected DatagramSocket(DatagramSocketImpl impl) throws SocketException
- Sending and Receiving Datagrams
- Managing Connections
-
The Constructors
- Socket Options
- Some Useful Applications
- DatagramChannel
- 13. IP Multicast
- Index
- Colophon
- Copyright
Product information
- Title: Java Network Programming, 4th Edition
- Author(s):
- Release date: October 2013
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449365950
You might also like
book
Java Network Programming, Second Edition
Java Network Programming, 2nd Edition, is a complete introduction to developing network programs (both applets and …
book
Learning Network Programming with Java
Harness the hidden power of Java to build network-enabled applications with lower network traffic and faster …
book
Hands-On Network Programming with C
A comprehensive guide to programming with network sockets, implementing internet protocols, designing IoT devices, and much …
book
TCP/IP Sockets in Java, 2nd Edition
The networking capabilities of the Java platform have been extended considerably since the first edition of …