java.net.InetAddress (JDK 1.0)
This class represents an Internet address, and is used when creating DatagramPacket or Socket objects. The class does not have a public constructor function, but instead supports three static methods which return one or more instances of InetAddress. getLocalHost() returns an InetAddress for the local host. getByName() returns the InetAddress of a host specified by name. getAllByName() returns an array of InetAddress that represents all of the available addresses for a host specified by name. Instance methods are getHostName(), which returns the hostname of an InetAddress, and getAddress(), which returns the Internet IP address as an array of bytes, with the highest-order byte as the first element of the array.
public final classInetAddressextends Object implements Serializable { //No Constructor//Class Methodspublic static InetAddress[]getAllByName(Stringhost) throws UnknownHostException; public static InetAddressgetByName(Stringhost) throws UnknownHostException; public static InetAddressgetLocalHost() throws UnknownHostException; //Public Instance Methodspublic booleanequals(Objectobj); //Overrides Objectpublic byte[]getAddress(); public StringgetHostAddress(); public StringgetHostName(); public inthashCode(); //Overrides Object1.1public booleanisMulticastAddress(); public StringtoString(); //Overrides Object}
Passed To:
DatagramPacket(), DatagramPacket.setAddress(), DatagramSocket(), DatagramSocketImpl.bind(), DatagramSocketImpl.join(), DatagramSocketImpl.leave(), DatagramSocketImpl.peek(), MulticastSocket.joinGroup(), MulticastSocket.leaveGroup(), MulticastSocket.setInterface(), SecurityManager.checkMulticast(), ServerSocket(), Socket(), SocketImpl.bind(), SocketImpl.connect()
Returned By:
DatagramPacket.getAddress(), DatagramSocket.getLocalAddress(), InetAddress.getAllByName(), InetAddress.getByName(), InetAddress.getLocalHost(), MulticastSocket.getInterface(), ServerSocket.getInetAddress(), Socket.getInetAddress(), Socket.getLocalAddress(), SocketImpl.getInetAddress()
Type Of:
SocketImpl.address