Create bookmark
Java Network Programming
Notes
Please login to add notes
- Table of Contents
- + Preface
-
+
Why Networked Java?
-
+
Basic Network Concepts
- + Basic Web Concepts
-
+
Streams
-
+
Threads
-
+
Looking Up Internet Addresses
-
+
The InetAddress Class
-
+
Creating New InetAddress Objects
- public static InetAddress getByName(String hostName) throws UnknownHostException
- public static InetAddress[] getAllByName(String hostName) throws UnknownHostException
- public static InetAddress getByAddress(byte[] address) throws UnknownHostException // Java 1.4 p...
- public static InetAddress getLocalHost() throws UnknownHostException
- Security Issues
- + Getter Methods
-
+
Address Types
- public boolean isAnyLocalAddress()
- public boolean isLoopbackAddress()
- public boolean isLinkLocalAddress()
- public boolean isSiteLocalAddress()
- public boolean isMulticastAddress()
- public boolean isMCGlobal()
- public boolean isMCOrgLocal()
- public boolean isMCSiteLocal()
- public boolean isMCLinkLocal()
- public boolean isMCNodeLocal()
- Testing Reachability // Java 1.5
- + Object Methods
-
+
Creating New InetAddress Objects
- Inet4Address and Inet6Address
-
+
The NetworkInterface Class
- + Some Useful Programs
-
+
The InetAddress Class
-
+
URLs and URIs
-
+
The URL Class
- + Creating New URLs
-
+
Splitting a URL into Pieces
- public String getProtocol()
- public String getHost()
- public int getPort()
- public int getDefaultPort()
- public String getFile()
- public String getPath() // Java 1.3
- public String getRef()
- public String getQuery() // Java 1.3
- public String getUserInfo() // Java 1.3
- public String getAuthority() // Java 1.3
- + Retrieving Data from a URL
- + Utility Methods
- + The Object Methods
- + Methods for Protocol Handlers
- + The URLEncoder and URLDecoder Classes
-
+
The URI Class
-
+
Constructing a URI
- public URI(String uri) throws URISyntaxException
- public URI(String scheme, String schemeSpecificPart, String fragment) throws URISyntaxException
- public URI(String scheme, String host, String path, String fragment) throws URISyntaxException
- public URI(String scheme, String authority, String path, String query, String fragment) throws UR...
- public URI(String scheme, String userInfo, String host, int port, String path, String query, Stri...
- public static URI create(String uri)
- The Parts of the URI
- + Resolving Relative URIs
- + Utility Methods
-
+
Constructing a URI
- + Proxies
- Communicating with Server-Side Programs Through GET
- + Accessing Password-Protected Sites
-
+
The URL Class
-
+
HTML in Swing
-
+
Sockets for Clients
- Socket Basics
- Investigating Protocols with Telnet
-
+
The Socket Class
-
+
The Constructors
- public Socket(String host, int port) throws UnknownHostException, IOException
- public Socket(InetAddress host, int port) throws IOException
- public Socket(String host, int port, InetAddress interface, int localPort) throws IOException, Un...
- public Socket(InetAddress host, int port, InetAddress interface, int localPort) throws IOException
- protected Socket()
- protected Socket(SocketImpl impl)
- public Socket(Proxy proxy) // Java 1.5
- + Getting Information About a Socket
- + Closing the Socket
- + Setting Socket Options
- Class of Service
- + The Object Methods
-
+
The Constructors
- Socket Exceptions
- Socket Addresses
- + Examples
-
+
Sockets for Servers
-
+
Secure Sockets
- + Non-Blocking I/O
-
+
UDP Datagrams and Sockets
- The UDP Protocol
-
+
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// Java1.4
- protected DatagramSocket(DatagramSocketImpl impl) throws SocketException //Java1.4
- + Sending and Receiving Datagrams
- + Managing Connections
- + Socket Options
-
+
The Constructors
- + Some Useful Applications
- + DatagramChannel
-
+
Multicast Sockets
- + What Is a Multicast Socket?
-
+
Working with Multicast Sockets
- + The Constructors
-
+
Communicating with a Multicast Group
- public void joinGroup(InetAddress address) throws IOException
- public void joinGroup(SocketAddress address, NetworkInterface interface) throws IOException // Ja...
- public void leaveGroup(InetAddress address) throws IOException
- public void leaveGroup(SocketAddress multicastAddress, NetworkInterface interface) throws IOExcep...
- public void send(DatagramPacket packet, byte ttl) throws IOException
- public void setInterface(InetAddress address) throws SocketException
- public InetAddress getInterface() throws SocketException
- public void setNetworkInterface(NetworkInterface interface) throws SocketException // Java 1.4
- public NetworkInterface getNetworkInterface() throws SocketException // Java 1.4
- public void setTimeToLive(int ttl) throws IOException // Java 1.2
- public int getTimeToLive() throws IOException // Java 1.2
- public void setLoopbackMode(boolean disable) throws SocketException//Java 1.4
- public boolean getLoopbackMode() throws SocketException // Java 1.4
- Two Simple Examples
-
+
URLConnections
- Opening URLConnections
- Reading Data from a Server
-
+
Reading the Header
- + Configuring the Connection
- Configuring the Client Request HTTP Header
- Writing Data to a Server
- + Content Handlers
- The Object Methods
- Security Considerations for URLConnections
- Guessing MIME Content Types
- + HttpURLConnection
- Caches
- JarURLConnection
-
+
Protocol Handlers
- What Is a Protocol Handler?
-
+
The URLStreamHandler Class
- The Constructor
-
+
Methods for Parsing URLs
- protected void parseURL(URL u, String spec, int start, int limit)
- protected String toExternalForm(URL u)
- protected void setURL(URL u, String protocol, String host, int port, String authority, String use...
- protected int getDefaultPort() // Java 1.3
- protected InetAddress getHostAddress(URL u) // Java 1.3
- protected boolean hostsEqual(URL u1, URL u2) // Java 1.3
- protected boolean sameFile(URL u1, URL u2) // Java 1.3
- protected boolean equals(URL u1, URL u2) // Java 1.3
- protected int hashCode(URL u) // Java 1.3
- + A Method for Connecting
- Writing a Protocol Handler
- + More Protocol Handler Examples andTechniques
- The URLStreamHandlerFactory Interface
-
+
Content Handlers
-
+
Remote Method Invocation
- + What Is Remote Method Invocation?
- + Implementation
- Loading Classes at Runtime
-
+
The java.rmi Package
- The Remote Interface
-
+
The Naming Class
- public static String[] list(String url) throws RemoteException, MalformedURLException
- public static Remote lookup(String url) throws RemoteException, NotBoundException, AccessExceptio...
- public static void bind(String url, Remote object) throws RemoteException, AlreadyBoundException,...
- public static void unbind(String url) throws RemoteException, NotBoundException, AlreadyBoundExce...
- public static void rebind(String url, Remote object) throws RemoteException, AccessException, Mal...
- The RMISecurityManager Class
- Remote Exceptions
- + The java.rmi.registry Package
- + The java.rmi.server Package
-
+
The JavaMail API
- Index
The new third edition of this highly regarded introduction to Java networking programming has been thoroughly revised to cover all of the 100+ significant updates to Java Developers Kit (JDK) 1.5. It is a clear, complete introduction to developing network programs (both applets and applications) using Java, covering everything from networking fundamentals to remote method invocation (RMI). Java Network Programming, 3rd Edition includes chapters on TCP and UDP sockets, multicasting protocol and content handlers, servlets, multithreaded network programming, I/O, HTML parsing and display, the Java Mail API, and the Java Secure Sockets Extension. There's also significant information on the New I/O API that was developed in large part because of the needs of network programmers. This invaluable book is a complete, single source guide to writing sophisticated network applications. Packed with useful examples, it is the essential resource for any serious Java developer.
Test the closed alpha on paperc.com
Book Details
Authors
Categories
Publishers
Publication year : 2008
License: All rights reserved ©
Times read: 2,403

