solar.util
Class NetUtil

java.lang.Object
  |
  +--solar.util.NetUtil

public class NetUtil
extends java.lang.Object

Some utility methods about networking.

Version:
$Id: NetUtil.java,v 1.8 2003/09/30 15:53:38 glchen Exp $
Author:
Guanling Chen

Constructor Summary
private NetUtil()
          Prevent object initialization.
 
Method Summary
static java.net.InetAddress getInetAddress(java.lang.String name)
          Get the InetAddress from host name, special treat on localhost.
static java.lang.String getIpAddress(java.net.InetAddress inetAddress)
          Get the digital IP address (no host name) in string format.
static java.lang.Object loadObject(java.lang.String codebase, java.lang.String clazz)
          Create a new object instance of specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetUtil

private NetUtil()
Prevent object initialization.

Method Detail

getInetAddress

public static java.net.InetAddress getInetAddress(java.lang.String name)
                                           throws java.net.UnknownHostException
Get the InetAddress from host name, special treat on localhost.

java.net.UnknownHostException

getIpAddress

public static java.lang.String getIpAddress(java.net.InetAddress inetAddress)
Get the digital IP address (no host name) in string format.


loadObject

public static java.lang.Object loadObject(java.lang.String codebase,
                                          java.lang.String clazz)
                                   throws java.lang.Exception
Create a new object instance of specified class.

java.lang.Exception