Since: API Level 1
package

java.net

Classes | Description

Provides networking-related functionality, such as streaming and datagram sockets, handling of Internet addresses, and dealing with HTTP requests.

more...

Interfaces

ContentHandlerFactory Defines a factory which is responsible for creating a ContentHandler
DatagramSocketImplFactory This interface defines a factory for datagram socket implementations. 
FileNameMap Defines a scheme for mapping a filename type to a MIME content type. 
SocketImplFactory This interface defines a factory for socket implementations. 
SocketOptions Defines an interface for socket implementations to get and set socket options. 
URLStreamHandlerFactory Defines a factory which creates an URLStreamHandler for a specified protocol. 

Classes

Authenticator An implementation of this class is able to obtain authentication information for a connection in several ways. 
CacheRequest CacheRequest is a kind of channel for storing resource data in the ResponseCache
CacheResponse CacheResponse is used for getting resource data from the installed ResponseCache
ContentHandler This class converts the content of a certain format (i.e. 
CookieHandler This class provides a way to manage cookies with a HTTP protocol handler. 
DatagramPacket This class represents a datagram packet which contains data either to be sent or received through a DatagramSocket
DatagramSocket This class implements a UDP socket for sending and receiving DatagramPacket
DatagramSocketImpl The abstract superclass for datagram and multicast socket implementations. 
HttpURLConnection This abstract subclass of URLConnection defines methods for managing HTTP connection according to the description given by RFC 2068. 
Inet4Address This class represents a 32 bit long IPv4 address. 
Inet6Address This class represents a 128 bit long IPv6 address. 
InetAddress An Internet Protocol (IP) address. 
InetSocketAddress This class represents a socket endpoint described by a IP address and a port number. 
JarURLConnection This class establishes a connection to a jar: URL using the JAR protocol. 
MulticastSocket This class implements a multicast socket for sending and receiving IP multicast datagram packets. 
NetPermission This class represents permissions to configure the access to network resources. 
NetworkInterface This class is used to represent a network interface of the local device. 
PasswordAuthentication This immutable class is a data structure that encapsulates username and password which is used by the Authenticator class. 
Proxy This class represents proxy server settings. 
ProxySelector Selects an applicable proxy server when connecting to a resource specified by a URL. 
ResponseCache This class is an implementation of URLConnection caches intended primarily for the according stream handler implementations. 
SecureCacheResponse A secure cache response represents data which is originally retrieved over a secure connection. 
ServerSocket This class represents a server-side socket that waits for incoming client connections. 
Socket Provides a client-side TCP socket. 
SocketAddress This abstract class represents a protocol-independent base for socket-endpoint representing classes. 
SocketImpl This class is the base of all streaming socket implementation classes. 
SocketPermission Regulates the access to network operations available through sockets through permissions. 
URI This class represents an instance of a URI as defined by RFC 2396. 
URL A URL instance specifies the location of a resource on the internet as specified by RFC 1738. 
URLClassLoader This class loader is responsible for loading classes and resources from a list of URLs which can refer to either directories or JAR files. 
URLConnection Concrete implementations of the abstract URLConnection class provide a communication link to a URL for exchanging data with a specific protocol type. 
URLDecoder This class is used to decode a string which is encoded in the application/x-www-form-urlencoded MIME content type. 
URLEncoder This class is used to encode a string using the format required by application/x-www-form-urlencoded MIME content type. 
URLStreamHandler The abstract class URLStreamHandler is the base for all classes which can handle the communication with a URL object over a particular protocol type. 

Enums

Authenticator.RequestorType Enumeration class for the origin of the authentication request. 
Proxy.Type Enum class for the proxy type. 

Exceptions

BindException A BindException is thrown when a process cannot bind a local address/port, either because it is already bound or reserved by the OS. 
ConnectException A ConnectException is thrown if a connection cannot be established to a remote host on a specific port. 
HttpRetryException If a HTTP request has to be retried, this exception will be thrown if the request cannot be retried automatically. 
MalformedURLException This exception is thrown when a program attempts to create an URL from an incorrect specification. 
NoRouteToHostException The NoRouteToHostException will be thrown while attempting to connect to a remote host but the host cannot be reached for instance because of a badly configured router or a blocking firewall. 
PortUnreachableException This PortUnreachableException will be thrown if an ICMP_Port_Unreachable message has been received. 
ProtocolException Signals that either a connection attempt to a socket of the wrong type, the application of an unsupported operation or that a general error in the underlying protocol has occurred. 
SocketException This SocketException may be thrown during socket creation or setting options, and is the superclass of all other socket related exceptions. 
SocketTimeoutException This exception is thrown when a timeout expired on a socket read or accept operation. 
UnknownHostException Is thrown when a hostname can not be resolved. 
UnknownServiceException Is thrown if no appropriate ContentHandler could be found for a particular service requested by the URL connection. 
URISyntaxException A URISyntaxException will be thrown if some information could not be parsed while creating a URI.