Uses of Class
java.net.InetAddress
Packages that useInetAddress
Package
Description
A Java API for Stream Control Transport Protocol.
Provides classes that are fundamental to the design of the Java programming language.
Provides the classes for implementing networking applications.
HTTP Client and WebSocket APIs
Service-provider classes for the
java.net package.Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Provides classes for networking applications.
Provides classes for the secure socket package.
This package contains utility classes related to the Kerberos network authentication protocol.
This package presents a framework that allows application developers to make use of security services like authentication, data integrity and data confidentiality from a variety of underlying security mechanisms like Kerberos, using a unified API.
Uses ofInetAddress incom.sun.nio.sctp
Methods incom.sun.nio.sctp with parameters of typeInetAddressModifier and TypeMethodDescriptionabstractSctpChannelSctpChannel.bindAddress(InetAddress address) Adds the given address to the bound addresses for the channel's socket.abstractSctpMultiChannelSctpMultiChannel.bindAddress(InetAddress address) Adds the given address to the bound addresses for the channel's socket.abstractSctpServerChannelSctpServerChannel.bindAddress(InetAddress address) Adds the given address to the bound addresses for the channel's socket.abstractSctpChannelSctpChannel.unbindAddress(InetAddress address) Removes the given address from the bound addresses for the channel's socket.abstractSctpMultiChannelSctpMultiChannel.unbindAddress(InetAddress address) Removes the given address from the bound addresses for the channel's socket.abstractSctpServerChannelSctpServerChannel.unbindAddress(InetAddress address) Removes the given address from the bound addresses for the channel's socket.Uses ofInetAddress injava.lang
Methods injava.lang with parameters of typeInetAddressModifier and TypeMethodDescriptionvoidSecurityManager.checkMulticast(InetAddress maddr) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.voidSecurityManager.checkMulticast(InetAddress maddr, byte ttl) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsSecurityException.Uses ofInetAddress injava.net
Subclasses ofInetAddress injava.netModifier and TypeClassDescriptionfinal classThis class represents an Internet Protocol version 4 (IPv4) address.final classThis class represents an Internet Protocol version 6 (IPv6) address.Fields injava.net declared asInetAddressModifier and TypeFieldDescriptionprotectedInetAddressSocketImpl.addressThe IP address of the remote end of this socket.Methods injava.net that returnInetAddressModifier and TypeMethodDescriptionDatagramPacket.getAddress()Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received, ornullif not set.finalInetAddressInetSocketAddress.getAddress()Gets theInetAddress.InterfaceAddress.getAddress()Returns anInetAddressfor this address.staticInetAddress[]InetAddress.getAllByName(String host) Given the name of a host, returns an array of its IP addresses, based on the system-wideresolver.InterfaceAddress.getBroadcast()Returns anInetAddressfor the broadcast address for this InterfaceAddress.staticInetAddressInetAddress.getByAddress(byte[] addr) Returns anInetAddressobject given the raw IP address .staticInetAddressInetAddress.getByAddress(String host, byte[] addr) Creates an InetAddress based on the provided host name and IP address.staticInetAddressDetermines the IP address of a host, given the host's name.protectedInetAddressURLStreamHandler.getHostAddress(URL u) Get the IP address of our host.DatagramSocket.getInetAddress()Returns the address to which this socket is connected.ServerSocket.getInetAddress()Returns the local address of this server socket.Socket.getInetAddress()Returns the address to which the socket is connected.protectedInetAddressSocketImpl.getInetAddress()Returns the value of this socket'saddressfield.MulticastSocket.getInterface()Deprecated.The network interface may not be uniquely identified by the InetAddress returned.DatagramSocket.getLocalAddress()Gets the local address to which the socket is bound.Socket.getLocalAddress()Gets the local address to which the socket is bound.staticInetAddressInetAddress.getLocalHost()Returns the address of the local host.staticInetAddressInetAddress.getLoopbackAddress()Returns the loopback address.protected finalInetAddressAuthenticator.getRequestingSite()Gets theInetAddressof the site requesting authorization, ornullif not available.staticInetAddressCreates anInetAddressbased on the providedtextual representation of an IPv6 address.staticInetAddressCreates anInetAddressbased on the providedtextual representation of an IP address.Methods injava.net that return types with arguments of typeInetAddressModifier and TypeMethodDescriptionNetworkInterface.getInetAddresses()Get an Enumeration of the InetAddresses bound to this network interface.NetworkInterface.inetAddresses()Get a Stream of the InetAddresses bound to this network interface.Methods injava.net with parameters of typeInetAddressModifier and TypeMethodDescriptionprotected abstract voidDatagramSocketImpl.bind(int lport,InetAddress laddr) Binds a datagram socket to a local port and address.protected abstract voidSocketImpl.bind(InetAddress host, int port) Binds this socket to the specified local IP address and port number.voidDatagramSocket.connect(InetAddress address, int port) Connects the socket to a remote address for this socket.protected voidDatagramSocketImpl.connect(InetAddress address, int port) Connects a datagram socket to a remote destination.protected abstract voidSocketImpl.connect(InetAddress address, int port) Connects this socket to the specified port number on the specified host.staticNetworkInterfaceNetworkInterface.getByInetAddress(InetAddress addr) Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.protected abstract voidDatagramSocketImpl.join(InetAddress inetaddr) Join the multicast group.voidMulticastSocket.joinGroup(InetAddress mcastaddr) Deprecated.This method does not accept the network interface on which to join the multicast group.protected abstract voidDatagramSocketImpl.leave(InetAddress inetaddr) Leave the multicast group.voidMulticastSocket.leaveGroup(InetAddress mcastaddr) Deprecated.This method does not accept the network interface on which to leave the multicast group.protected abstract intDatagramSocketImpl.peek(InetAddress i) Peek at the packet to see who it is from.staticPasswordAuthenticationAuthenticator.requestPasswordAuthentication(String host,InetAddress addr, int port,String protocol,String prompt,String scheme) Ask the authenticator that has been registered with the system for a password.staticPasswordAuthenticationAuthenticator.requestPasswordAuthentication(String host,InetAddress addr, int port,String protocol,String prompt,String scheme,URL url,Authenticator.RequestorType reqType) Ask the authenticator that has been registered with the system for a password.staticPasswordAuthenticationAuthenticator.requestPasswordAuthentication(Authenticator authenticator,String host,InetAddress addr, int port,String protocol,String prompt,String scheme,URL url,Authenticator.RequestorType reqType) Ask the givenauthenticatorfor a password.staticPasswordAuthenticationAuthenticator.requestPasswordAuthentication(InetAddress addr, int port,String protocol,String prompt,String scheme) Ask the authenticator that has been registered with the system for a password.Authenticator.requestPasswordAuthenticationInstance(String host,InetAddress addr, int port,String protocol,String prompt,String scheme,URL url,Authenticator.RequestorType reqType) Ask this authenticator for a password.voidDatagramPacket.setAddress(InetAddress iaddr) Sets the IP address of the machine to which this datagram is being sent.voidMulticastSocket.setInterface(InetAddress inf) Deprecated.The InetAddress may not uniquely identify the network interface.Constructors injava.net with parameters of typeInetAddressModifierConstructorDescriptionDatagramPacket(byte[] buf, int offset, int length,InetAddress address, int port) Constructs a datagram packet for sending packets of lengthlengthwith offsetoffsetto the specified port number on the specified host.DatagramPacket(byte[] buf, int length,InetAddress address, int port) Constructs a datagram packet for sending packets of lengthlengthto the specified port number on the specified host.DatagramSocket(int port,InetAddress laddr) Creates a datagram socket, bound to the specified local address.InetSocketAddress(InetAddress addr, int port) Creates a socket address from an IP address and a port number.ServerSocket(int port, int backlog,InetAddress bindAddr) Create a server with the specified port, listen backlog, and local IP address to bind to.Socket(String host, int port,InetAddress localAddr, int localPort) Creates a socket and connects it to the specified remote host on the specified remote port.Socket(InetAddress address, int port) Creates a stream socket and connects it to the specified port number at the specified IP address.Socket(InetAddress host, int port, boolean stream) Deprecated, for removal: This API element is subject to removal in a future version.UseDatagramSocketinstead for UDP transport.Socket(InetAddress address, int port,InetAddress localAddr, int localPort) Creates a socket and connects it to the specified remote address on the specified remote port.Uses ofInetAddress injava.net.http
Methods injava.net.http with parameters of typeInetAddressModifier and TypeMethodDescriptiondefaultHttpClient.BuilderHttpClient.Builder.localAddress(InetAddress localAddr) Binds the socket to this local address when creating connections for sending requests.Uses ofInetAddress injava.net.spi
Methods injava.net.spi that return types with arguments of typeInetAddressModifier and TypeMethodDescriptionInetAddressResolver.lookupByName(String host,InetAddressResolver.LookupPolicy lookupPolicy) Given the name of a host, returns a stream of IP addresses of the requested address family associated with a provided hostname.Uses ofInetAddress injava.nio.channels
Methods injava.nio.channels that returnInetAddressModifier and TypeMethodDescriptionabstractInetAddressMembershipKey.group()Returns the multicast group for which this membership key was created.abstractInetAddressMembershipKey.sourceAddress()Returns the source address if this membership key is source-specific, ornullif this membership is not source-specific.Methods injava.nio.channels with parameters of typeInetAddressModifier and TypeMethodDescriptionabstractMembershipKeyMembershipKey.block(InetAddress source) Block multicast datagrams from the given source address.MulticastChannel.join(InetAddress group,NetworkInterface interf) Joins a multicast group to begin receiving all datagrams sent to the group, returning a membership key.MulticastChannel.join(InetAddress group,NetworkInterface interf,InetAddress source) Joins a multicast group to begin receiving datagrams sent to the group from a given source address.abstractMembershipKeyMembershipKey.unblock(InetAddress source) Unblock multicast datagrams from the given source address that was previously blocked using theblockmethod.Uses ofInetAddress injavax.net
Methods injavax.net with parameters of typeInetAddressModifier and TypeMethodDescriptionabstractServerSocketServerSocketFactory.createServerSocket(int port, int backlog,InetAddress ifAddress) Returns a server socket bound to the specified port, with a specified listen backlog and local IP.abstractSocketSocketFactory.createSocket(String host, int port,InetAddress localHost, int localPort) Creates a socket and connects it to the specified remote host on the specified remote port.abstractSocketSocketFactory.createSocket(InetAddress host, int port) Creates a socket and connects it to the specified port number at the specified address.abstractSocketSocketFactory.createSocket(InetAddress address, int port,InetAddress localAddress, int localPort) Creates a socket and connect it to the specified remote address on the specified remote port.Uses ofInetAddress injavax.net.ssl
Constructors injavax.net.ssl with parameters of typeInetAddressModifierConstructorDescriptionprotectedSSLServerSocket(int port, int backlog,InetAddress address) Used only by subclasses.protectedSSLSocket(String host, int port,InetAddress clientAddress, int clientPort) Used only by subclasses.protectedSSLSocket(InetAddress address, int port) Used only by subclasses.protectedSSLSocket(InetAddress address, int port,InetAddress clientAddress, int clientPort) Used only by subclasses.Uses ofInetAddress injavax.security.auth.kerberos
Methods injavax.security.auth.kerberos that returnInetAddressModifier and TypeMethodDescriptionfinalInetAddress[]KerberosTicket.getClientAddresses()Returns a list of addresses from where the ticket can be used.Constructors injavax.security.auth.kerberos with parameters of typeInetAddressModifierConstructorDescriptionKerberosTicket(byte[] asn1Encoding,KerberosPrincipal client,KerberosPrincipal server, byte[] sessionKey, int keyType, boolean[] flags,Date authTime,Date startTime,Date endTime,Date renewTill,InetAddress[] clientAddresses) Constructs aKerberosTicketusing credentials information that a client either receives from a KDC or reads from a cache.Uses ofInetAddress inorg.ietf.jgss
Methods inorg.ietf.jgss that returnInetAddressModifier and TypeMethodDescriptionChannelBinding.getAcceptorAddress()Get the acceptor's address for this channel binding.ChannelBinding.getInitiatorAddress()Get the initiator's address for this channel binding.Constructors inorg.ietf.jgss with parameters of typeInetAddressModifierConstructorDescriptionChannelBinding(InetAddress initAddr,InetAddress acceptAddr, byte[] appData) Create a ChannelBinding object with user supplied address information and data.