net.proxy
Class NetProxy

java.lang.Object
  extended by net.proxy.NetProxy

public class NetProxy
extends java.lang.Object


Constructor Summary
NetProxy()
           
 
Method Summary
static void checkProxy(java.net.InetAddress proxy)
           
static java.net.PasswordAuthentication getHttpPasswordAuthentictor()
           
static java.lang.String getMacAddress()
           
static void main(java.lang.String[] args)
           
static void printProxy()
           
static void setFtpProxy(java.lang.String host, java.lang.String port)
           
static void setHttpProxy(java.lang.String host, java.lang.String port)
           
static void setSoeProxy()
          use a proxy server when connecting to the web.
static int subnet(java.net.InetAddress subnet, int mask)
          Creates a subnet from CIDR notation.
static int toInt(java.net.InetAddress inetAddress)
          Converts an IP address into an integer
static int toSubnet(java.net.InetAddress address, int subnetMask)
          Converts an IP address to a subnet using the provided mask
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetProxy

public NetProxy()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

checkProxy

public static void checkProxy(java.net.InetAddress proxy)

toSubnet

public static int toSubnet(java.net.InetAddress address,
                           int subnetMask)
Converts an IP address to a subnet using the provided mask

Parameters:
address - The address to convert into a subnet
Returns:
The subnet as an integer

subnet

public static int subnet(java.net.InetAddress subnet,
                         int mask)
Creates a subnet from CIDR notation. For example, the subnet 192.168.0.0/24 would be created using the InetAddress 192.168.0.0 and the mask 24.

Parameters:
subnet - The InetAddress of the subnet
mask - The mask

printProxy

public static void printProxy()
                       throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

setSoeProxy

public static void setSoeProxy()
use a proxy server when connecting to the web. SOE = School of Engineering affineTransform Fairfield. For example: Proxy.setSoeProxy();


toInt

public static int toInt(java.net.InetAddress inetAddress)
Converts an IP address into an integer

Parameters:
inetAddress - to be converted
Returns:
The int

setHttpProxy

public static void setHttpProxy(java.lang.String host,
                                java.lang.String port)

setFtpProxy

public static void setFtpProxy(java.lang.String host,
                               java.lang.String port)

getHttpPasswordAuthentictor

public static java.net.PasswordAuthentication getHttpPasswordAuthentictor()

getMacAddress

public static java.lang.String getMacAddress()
                                      throws java.net.UnknownHostException,
                                             java.net.SocketException
Throws:
java.net.UnknownHostException
java.net.SocketException