Lines Matching defs:InetAddress

63  * InetAddress consists of an IP address and possibly its
133 * <p> The InetAddress class provides methods to resolve host names to
136 * <h4> InetAddress Caching </h4>
138 * The InetAddress class has a cache to store successful as well as
182 * @see java.net.InetAddress#getByAddress(byte[])
183 * @see java.net.InetAddress#getByAddress(java.lang.String, byte[])
184 * @see java.net.InetAddress#getAllByName(java.lang.String)
185 * @see java.net.InetAddress#getByName(java.lang.String)
186 * @see java.net.InetAddress#getLocalHost()
190 class InetAddress implements java.io.Serializable {
269 * This creates an empty InetAddress, which is filled in by
270 * the accept() method. This InetAddress, however, is not
273 InetAddress() {
291 * Utility routine to check if the InetAddress is an
293 * @return a <code>boolean</code> indicating if the InetAddress is
302 * Utility routine to check if the InetAddress in a wildcard address.
312 * Utility routine to check if the InetAddress is a loopback address.
314 * @return a <code>boolean</code> indicating if the InetAddress is
323 * Utility routine to check if the InetAddress is an link local address.
325 * @return a <code>boolean</code> indicating if the InetAddress is
334 * Utility routine to check if the InetAddress is a site local address.
336 * @return a <code>boolean</code> indicating if the InetAddress is
474 * <p>If this InetAddress was created with a host name,
493 * @see InetAddress#getCanonicalHostName
525 holder().hostName = InetAddress.getHostFromNameService(this, check);
554 InetAddress.getHostFromNameService(this, true);
578 private static String getHostFromNameService(InetAddress addr, boolean check) {
600 InetAddress[] arr = InetAddress.getAllByName0(host, check);
630 * Returns the raw IP address of this <code>InetAddress</code>
665 * Two instances of <code>InetAddress</code> represent the same IP
673 * @see java.net.InetAddress#getAddress()
704 static InetAddress[] unknown_array; // put THIS in cache
715 CacheEntry(InetAddress[] addresses, long expiration) {
720 InetAddress[] addresses;
755 public Cache put(String host, InetAddress[] addresses) {
832 unknown_array = new InetAddress[1];
845 InetAddress[] addresses,
862 private static InetAddress[] getCachedAddresses(String hostname) {
892 public InetAddress[] lookupAllHostAddr(String host)
966 * Creates an InetAddress based on the provided host name and IP address.
983 * @return an InetAddress object created from the raw IP address.
987 public static InetAddress getByAddress(String host, byte[] addr)
1025 * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
1039 public static InetAddress getByName(String host)
1041 return InetAddress.getAllByName(host)[0];
1045 private static InetAddress getByName(String host, InetAddress reqAddr)
1047 return InetAddress.getAllByName(host, reqAddr)[0];
1065 * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
1089 public static InetAddress[] getAllByName(String host)
1094 private static InetAddress[] getAllByName(String host, InetAddress reqAddr)
1098 InetAddress[] ret = new InetAddress[1];
1138 InetAddress[] ret = new InetAddress[1];
1161 * The InetAddress returned will represent the IPv4
1166 * @return the InetAddress loopback instance.
1169 public static InetAddress getLoopbackAddress() {
1205 private static InetAddress[] getAllByName0 (String host)
1214 static InetAddress[] getAllByName0 (String host, boolean check)
1219 private static InetAddress[] getAllByName0 (String host, InetAddress reqAddr, boolean check)
1223 /* Cache.get can return: null, unknownAddress, or InetAddress[] */
1235 InetAddress[] addresses = getCachedAddresses(host);
1248 private static InetAddress[] getAddressesFromNameService(String host, InetAddress reqAddr)
1251 InetAddress[] addresses = null;
1291 InetAddress[] local = new InetAddress[] { impl.loopbackAddress() };
1315 InetAddress tmp, tmp2 = reqAddr;
1341 private static InetAddress[] checkLookupTable(String host) {
1366 InetAddress[] addresses = getCachedAddresses(host);
1385 * Returns an <code>InetAddress</code> object given the raw IP address .
1396 * @return an InetAddress object created from the raw IP address.
1400 public static InetAddress getByAddress(byte[] addr)
1405 private static InetAddress cachedLocalHost = null;
1413 * an <code>InetAddress</code>.
1422 * If the operation is not allowed, an InetAddress representing
1431 * @see java.net.InetAddress#getByName(java.lang.String)
1433 public static InetAddress getLocalHost() throws UnknownHostException {
1447 InetAddress ret = null;
1460 InetAddress[] localAddrs;
1463 InetAddress.getAddressesFromNameService(local, null);
1490 * Returns the InetAddress representing anyLocalAddress
1493 static InetAddress anyLocalAddress() {
1553 InetAddress.class.getDeclaredField("holder")
1607 return InetAddress.loadImpl(isIPv6Supported() ?