- Preface
- 1. Why Networked Java?
-
- What Can a Network Program Do?
- Communicating with the devices accross the network
- java.net package has collection of classes and interfaces,
tendering a means to develop application to communicate among the
devices in a network
- 2. Basic Network Concepts
-
- Networks
- The Layers of a Network
- IP, TCP, and UDP
- The Internet
- The Client/Server Model
- Internet Standards
- 3. Basic Web Concepts
-
- URIs
- HTML, SGML, and XML
- HTTP
- MIME Media Types
- Server Side Programs
- 4. Java I/O
-
- Output Streams
- Input Streams
- Filter Streams
- Readers and Writers
- 5. Threads
-
- Running Threads
- Returning Information from a Thread
- Synchronization
- Deadlock
- Thread Scheduling
- Thread Pools
- 6. Looking Up Internet Addresses
-
- The InetAddress Class
- Inet4Address and Inet6Address
- The NetworkInterface Class
- Some Useful Programs
- 7. URLs and URIs
-
- The URL Class
- The URLEncoder and URLDecoder Classes
- The URI Class
- Proxies
- Communicating with Server-Side Programs Through GET
- Accessing Password-Protected Sites
- 8. HTML in Swing
-
- HTML on Components
- JEditorPane
- Parsing HTML
- Cookies
- 9. Sockets for Clients
-
- Socket Basics
:
- A socket is a reliable connection for the transmission of data
between two hosts.
- Sockets isolate programmers from the details of packet
encodings, lost and retransmitted packets, and packets that arrive
out of order.
- Operations: Connect to a remote machine
Send data,Receive data,Close the connection
- A socket may not reconnect after it's closed
- Investigating Protocols with Telnet
- The Socket Class
- java.net.Socket class allows the developer to create socket
objects
- allows connecting remote machine, sending and receiving data,
end the communications.
- Each socket connects one host, to connect different host new
socket objects are required.
- Socket Exceptions
- Socket(String host, int port) throws UnknownHostException
- Socket Addresses
- public Socket(InetAddress address, int port) throws IOException
- public Socket(String host, int port, InetAddress localAddr, int
localPort)
throws IOException
- public Socket(InetAddress address, int port, InetAddress
localAddr, int
localPort) throws IOException
- Examples
- 10. Sockets for Servers
-
- The ServerSocket Class
- Some Useful Servers
- 11. Secure Sockets
-
- Secure Communications
- Creating Secure Client Sockets
- Methods of the SSLSocket Class
- Creating Secure Server Sockets
- Methods of the SSLServerSocket Class
- 12. Non-Blocking I/O
-
- An Example Client
- An Example Server
- Buffers
- Channels
- Readiness Selection
- 13. UDP Datagrams and Sockets
-
- The UDP Protocol
- The DatagramPacket Class
- The DatagramSocket Class
- Some Useful Applications
- DatagramChannel
- 14. Multicast Sockets
-
- What Is a Multicast Socket?
- Working with Multicast Sockets
- Two Simple Examples
- 15. The URLConnection Class
-
- Opening URLConnections
- Reading Data from a Server
- Reading the Header
- Configuring the Connection
- Configuring the Client Request MIME Header
- Writing Data to a Server
- Content Handlers
- The Object Methods
- Security Considerations for URLConnections
- Guessing MIME Types
- HttpURLConnection
- Caches
- JarURLConnection
- 16. Protocol Handlers
-
- What Is a Protocol Handler?
- The URLStreamHandler Class
- Writing a Protocol Handler
- More Protocol Handler Examples and Techniques
- The URLStreamHandlerFactory Interface
- 17. Content Handlers
-
- What Is a Content Handler?
- The ContentHandler Class
- The ContentHandlerFactory Interface
- A Content Handler for the FITS Image Format
- 18. Remote Method Invocation
-
- What Is Remote Method Invocation?
- Implementation
- Loading Classes at Runtime
- The java.rmi Package
- The java.rmi.registry Package
- The java.rmi.server Package
- 19. The JavaMail API
-
- What Is the JavaMail API?
- Sending Email
- Receiving Mail
- Password Authentication
- Addresses
- The URLName Class
- The Message Class
- The Part Interface
- Multipart Messages and File Attachments
- MIME Messages
- Folders
- Index
|