wt.security
Class NetAccess

java.lang.Object
  extended by wt.security.Access
      extended by wt.security.NetAccess

public class NetAccess
extends wt.security.Access

Class that provides wrappers to priviledged network methods using the wt.security package. This allows applets to perform network operations that are typically restricted by the sandbox.

Supported API: true


Method Summary
 void connect(URLConnection connection)
          Wrapper for URLConnection.connect() method
 byte[] getAddress(InetAddress inetaddress)
          Wrapper for InetAddress.getAddress() method
 String getHostAddress(InetAddress inetaddress)
          Wrapper for InetAddress.getHostAddress() method
 String getHostName(InetAddress inetaddress)
          Wrapper for InetAddress.getHostName() method
 InetAddress getLocalHost()
          Wrapper for InetAddress.getLocalHost() method

Supported API: true
static NetAccess getNetAccess()
          Get instance of NetAccess.
static NetAccess getNetAccess(Frame parentFrame)
          Get instance of NetAccess.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNetAccess

public static NetAccess getNetAccess(Frame parentFrame)
Get instance of NetAccess. This instance can then be used to perform network operations that are typically restricted by the sandbox.

Parameters:
parentFrame - the parent frame for security dialog boxes that may be presented

Supported API: true

getNetAccess

public static NetAccess getNetAccess()
Get instance of NetAccess. This instance can then be used to perform network operations that are typically restricted by the sandbox.

Supported API: true


connect

public final void connect(URLConnection connection)
                   throws WTSecurityException,
                          IOException
Wrapper for URLConnection.connect() method

Parameters:
connection - the URLConnection object to be connected

Supported API: true
Throws:
WTSecurityException
IOException

getLocalHost

public final InetAddress getLocalHost()
                               throws WTSecurityException,
                                      UnknownHostException
Wrapper for InetAddress.getLocalHost() method

Supported API: true

Throws:
WTSecurityException
UnknownHostException

getAddress

public final byte[] getAddress(InetAddress inetaddress)
                        throws WTSecurityException
Wrapper for InetAddress.getAddress() method

Parameters:
inetaddress - the InetAddress object to retrieve address for

Supported API: true
Throws:
WTSecurityException

getHostAddress

public final String getHostAddress(InetAddress inetaddress)
                            throws WTSecurityException
Wrapper for InetAddress.getHostAddress() method

Parameters:
inetaddress - the InetAddress object to retrieve address for

Supported API: true
Throws:
WTSecurityException

getHostName

public final String getHostName(InetAddress inetaddress)
                         throws WTSecurityException
Wrapper for InetAddress.getHostName() method

Parameters:
inetaddress - the InetAddress object to retrieve address for

Supported API: true
Throws:
WTSecurityException