irc.security.prv
Class SpecificMSSecuredProvider

java.lang.Object
  |
  +--irc.security.prv.SpecificMSSecuredProvider
All Implemented Interfaces:
SecuredProvider

public class SpecificMSSecuredProvider
extends java.lang.Object
implements SecuredProvider

Specific secured provider to use with microsoft internet explorer.


Constructor Summary
SpecificMSSecuredProvider()
           
 
Method Summary
 java.awt.FileDialog getFileDialog(java.awt.Frame top, java.lang.String title, int type)
           
 java.io.FileInputStream getFileInputStream(java.io.File file)
          Get an FileInputStream from a local file.
 java.io.FileOutputStream getFileOutputStream(java.io.File file)
          Get an FileOutputStream to a local file.
 int getFileSize(java.io.File file)
          Get the file size.
 java.io.File getLoadFile(java.lang.String title)
          Open a load file dialog with the given title and return the user choice.
 java.net.InetAddress getLocalHost()
          Get the local host address.
 java.lang.String getName()
          Get this provider's name.
 java.io.File getSaveFile(java.lang.String title)
          Open a save file dialog with the given title and return the user choice.
 java.net.ServerSocket getServerSocket(int port)
          Get a new ServerSocket.
 java.net.Socket getSocket(java.lang.String host, int port)
          Get a new Socket.
 java.lang.String resolve(java.net.InetAddress addr)
          Perform a dns resolve of the given address.
 boolean tryProvider()
          Try to use this provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecificMSSecuredProvider

public SpecificMSSecuredProvider()
Method Detail

getSocket

public java.net.Socket getSocket(java.lang.String host,
                                 int port)
                          throws java.net.UnknownHostException,
                                 java.io.IOException
Description copied from interface: SecuredProvider
Get a new Socket.

Specified by:
getSocket in interface SecuredProvider
Parameters:
host - server host.
port - server port.
Returns:
a new Socket.
Throws:
java.net.UnknownHostException - is host is not found.
java.io.IOException - if an error occurs.

getServerSocket

public java.net.ServerSocket getServerSocket(int port)
                                      throws java.io.IOException
Description copied from interface: SecuredProvider
Get a new ServerSocket.

Specified by:
getServerSocket in interface SecuredProvider
Parameters:
port - local port.
Throws:
java.io.IOException - if an error occurs.

getFileInputStream

public java.io.FileInputStream getFileInputStream(java.io.File file)
                                           throws java.io.IOException
Description copied from interface: SecuredProvider
Get an FileInputStream from a local file.

Specified by:
getFileInputStream in interface SecuredProvider
Parameters:
file - the local file.
Returns:
an FileInputStream from the file.
Throws:
java.io.IOException - if an error occurs.

getFileSize

public int getFileSize(java.io.File file)
Description copied from interface: SecuredProvider
Get the file size.

Specified by:
getFileSize in interface SecuredProvider
Parameters:
file - the file to get size.
Returns:
the file size, of a negative value if not able.

getFileOutputStream

public java.io.FileOutputStream getFileOutputStream(java.io.File file)
                                             throws java.io.IOException
Description copied from interface: SecuredProvider
Get an FileOutputStream to a local file.

Specified by:
getFileOutputStream in interface SecuredProvider
Parameters:
file - the local file.
Returns:
an FileOutputStream from the file.
Throws:
java.io.IOException - if an error occurs.

getFileDialog

public java.awt.FileDialog getFileDialog(java.awt.Frame top,
                                         java.lang.String title,
                                         int type)

getLoadFile

public java.io.File getLoadFile(java.lang.String title)
Description copied from interface: SecuredProvider
Open a load file dialog with the given title and return the user choice.

Specified by:
getLoadFile in interface SecuredProvider
Parameters:
title - dialog title.
Returns:
user choice.

getSaveFile

public java.io.File getSaveFile(java.lang.String title)
Description copied from interface: SecuredProvider
Open a save file dialog with the given title and return the user choice.

Specified by:
getSaveFile in interface SecuredProvider
Parameters:
title - dialog title.
Returns:
user choice.

getLocalHost

public java.net.InetAddress getLocalHost()
                                  throws java.net.UnknownHostException
Description copied from interface: SecuredProvider
Get the local host address.

Specified by:
getLocalHost in interface SecuredProvider
Returns:
local host address.
Throws:
java.net.UnknownHostException - if error occurs.

resolve

public java.lang.String resolve(java.net.InetAddress addr)
Description copied from interface: SecuredProvider
Perform a dns resolve of the given address.

Specified by:
resolve in interface SecuredProvider
Parameters:
addr - address to resolve.
Returns:
resolved address.

tryProvider

public boolean tryProvider()
Description copied from interface: SecuredProvider
Try to use this provider. Return false if this provider is not able to perform its task.

Specified by:
tryProvider in interface SecuredProvider
Returns:
true if this provider can be used, false otherwise.

getName

public java.lang.String getName()
Description copied from interface: SecuredProvider
Get this provider's name.

Specified by:
getName in interface SecuredProvider
Returns:
the provder name.