java.net

Java programs are built specially to be run on a network. For the practice of these network applications, a set of classes is provided under this package.

A summary of various classes of java.net package is given below:

ClassDescription
AuthenticatorFor networking applications it is first important to fetch the authentication for a connection in a network. The object of the Authenticator class is responsible for obtaining the same. The class is declared as follows:
public class Authenticator extends Object
The class methods are inherited from the Object class.
CacheRequestWe all know about the cache memory, which is used for fast retrieval of information. The class CacheRequest does somewhat similar work by storing the responses in the CacheResponse class. The class is declared as follows:
public abstract class CacheRequest extends Object
The class methods are inherited from the Object class.
CacheResponseThe class aims at the retrieval of records from the CacheResponse. The class is declared as follows:
public abstract class CacheResponse extends Object
The class methods are inherited from the Object class.
ContentHandlerThe connection in a network is established with the help of URL. The class ContentHandler is the superclass of the classes which are appointed for reading the objects from the URL. The class is declared as follows:
public abstract class ContentHandler extends Object
The class methods are inherited from the Object class.
CookieHandlerThe class object is implied for the association of HTTP protocol handler with the HTTP state management policy implementation. The class is declared as follows:
public abstract class CookieHandler extends Object
The class methods are inherited from the Object class.
CookieManagerThe class extends the CookieHandler class i.e. The CookieManager implements the CookieHnadler. The class is declared as follows:
public abstract class CookieManager extends CookieHandler
The class methods are inherited from the CookieHandler and Object class.
DatagramPacketA datagram packet is rendered by the class. The class is declared as follows:
public final class DatagramPacket extends Object
The class methods are inherited from the Object class
DatagramSocketFor the transfer of datagram packets in a network an entity called as socket is required. The class provides the same. The class is declared as follows:
public final class DatagramSocket extends Object implements Closeable
The class methods are inherited from the Object class
DatagramSocketImplThe class serves as the parent for the implementation of sockets and datagram. The class is declared as:
public final class DatagramSocketImp extends Object implements SocketOptions
The class methods are inherited from the Object class
InterfaceAddressThe address of the network interface is represented by this class. The class is declared as follows:
public class InterfaceAddress extends Object
The class methods are inherited from the Object class.
JarURLConnectionThe class is responsible for the establishment of the URL connection to the JAR files. The class is declared as follows:
public abstract class JarURLConnection extends URLConnection
The class methods are inherited from the URLConnection and Object class.
MulticastSocketFor the transfer of Multicast IP packets the class is implied. The class is declared as follows:
public abstract class MulticastSocket extends DatagramSocket.
The class methods are inherited from the DatagramSocket and Object class.
InetSocketAddressIP Socket Address is a combination of the IP address and the port number. The class provides the implementation of the same. It is declared as follows:
public class InetSocketAddress extends Object implements SocketAdress
The class methods are inherited from the Object class
InetAddressIP(Internet Protocol) address is represented by the class. The class is declared as:
public final class InetAddress extends Object implements Serializable
The class methods are inherited from the Object class.
Inet4AddressThe internet address is represented as the Internet Protocol version 6 i.e Inet6 address. The class is declared as:
public final class Inet6Address extends InetAddress
The class methods are inherited from the Object and InetAddress class.
Inet6AddressThe internet address is represented as the Internet Protocol version 4 i.e Inet4 address. The class is declared as:
public final class Inet4Address extends InetAddress
The class methods are inherited from the Object and InetAddress class.
IDNThe class is implied for the conversion of IDN between the ACE and Unicode representation. The class is declared as:
public final class IDN extends Object
The class methods are inherited from the Object class.
HttpURLConnectionThe class is implied for obtaining the URL connections and also has support for HTTP features. The class is declared as:
public final class HttpURLConnection extends URLConnection
The class methods are inherited from the Object and URLConnection class.
HttpCookieWe all have heard about cookies in the web browsers which are appointed for carrying of information related to states between the client and the server. The class represents such HTTP cookies. The class is declared as:
public final class HttpCookie extends Object implements Cloneable
The class methods are inherited from the Object class.
NetPermissionFor providing various network related permissions the class is used. The class is declared as:
public final class NetPermission extends BasePermission
The class methods are inherited from the BasePermission class.
NetworkInterfaceA network interface is representation is provided by the class. The class is declared as:
public final class NetworkInterface extends Object
The class methods are inherited from the Object class.
PasswordAuthenticationThe class is used by the Authenticator as a data holder. The class is declared as:
public final class PasswordAuthentication extends Object
The class methods are inherited from the Object class.
ProxyThe class is used for proxy related settings. The class is declared as:
public final class Proxy extends Object
The class methods are inherited from the Object class.
ProxySelectorThe class is used for the selection for the proxy server to be used. The class is declared as:
public final class ProxySelector extends Object
The class methods are inherited from the Object class.
ResponseCacheCaches which are linked to the URL connections are represented by this class. The class is declared as:
public abstract class ResponseCache extends Object
The class methods are inherited from the Object class.
SecureCacheResponseA cache which is obtained through the use of secure means is represented by this class. The class is declared as:
public abstract class SecureCacheResponse extends CacheResponse
The class methods are inherited from the Object class.
ServerSocketThe class is implied for the implementation of server sockets. The class is declared as:
public abstract class ServerSocket extends Object implements Cloaseable.
The class methods are inherited from the Object class.
SocketThe sockets which are linked to the client side is implemented by the class. The class is declared as:
public abstract class Socket extends Object implements Cloaseable.
The class methods are inherited from the Object class.
SocketAddressThe class is implied for the representation of Socket Address. The class is declared as:
public abstract class SocketAddress extends Object implements Serializable
The class methods are inherited from the Object class.
SocketImplThe class is a parent class of all the socket implementing classes. The class is declared as:
public abstract class SocketImpl extends Object implements SocketOptions
The class methods are inherited from the Object class.
SocketPermissionThe class is implied for the provision of network access with the help of sockets. The class is declared as:
public final class SocketPermission extends Permission implements Serializable
The class methods are inherited from the Object and Permission class.
StandardSocketOptionsAs implied by the class name, the class is used to provide the standard socket options. The class is declared as:
public abstract class StandardSocketOptions extends Object
The class methods are inherited from the Object class.
URIThe class is a representation of Uniform Resource Identifier. The class is declared as:
public final class URI extends Object implements Serializable, Comparable
The class methods are inherited from the Object class.
URLThe class is a representation of Uniform Resource Locator. The class is declared as:
public final class URL extends Object implements Serializable
The class methods are inherited from the Object class.
URLClassLoaderThe class is used for loading of loading of various classes and resources specified with the search path. The class is declared as:
public final class URL extends SecureClassLoader implements Closeable
The class methods are inherited from the SecureClassLoader class.
URLConnectionThe class is a parent class of the ones representing a communication between the application and an URL. The class is declared as:
public final class URLConnection extends Object
The class methods are inherited from the Object class.
URLDecoderHTML forms are decoded by this class. The class is declared as:
public final class URLDecoder extends Object
The class methods are inherited from the Object class.
URLEncoderHTML forms are encoded by this class. The class is declared as:
public final class URLEncoder extends Object
The class methods are inherited from the Object class.
URLStreamHandlerThe class is a parent class of all the Stream Protocol Handlers. The class is declared as:
public final class URLStreamHandler extends Object
The class methods are inherited from the Object class.