Package edu.uiuc.ncsa.security.core.util
Class HostUtil
- java.lang.Object
- 
- edu.uiuc.ncsa.security.core.util.HostUtil
 
- 
 public class HostUtil extends Object Utility for looking up a host. Mostly a facade to make life easier.Created by Jeff Gaynor 
 on 10/22/13 at 11:48 AM
- 
- 
Constructor SummaryConstructors Constructor Description HostUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcanonicalName(String hostName)This is the *real* host.static StringreverseLookup(byte[] address)The address is either 4 bytes (IpV 4) or 16 bytes (IpV 6).static StringreverseLookup(String dottedQuadAddress)
 
- 
- 
- 
Method Detail- 
canonicalNamepublic static String canonicalName(String hostName) throws UnknownHostException This is the *real* host. The user may set the host property but this should be used internally since it will do any reverse lookups needed.- Returns:
- Throws:
- UnknownHostException
 
 - 
reverseLookuppublic static String reverseLookup(byte[] address) throws UnknownHostException The address is either 4 bytes (IpV 4) or 16 bytes (IpV 6). This returns the name associated with the address or throws an exception if no such name is known- Parameters:
- address-
- Returns:
- Throws:
- UnknownHostException
 
 - 
reverseLookuppublic static String reverseLookup(String dottedQuadAddress) throws UnknownHostException - Throws:
- UnknownHostException
 
 
- 
 
-