net.sourceforge.jdbdump.connect
Class FTPConfigurationIO

java.lang.Object
  extended by net.sourceforge.jdbdump.connect.ConfigurationIO
      extended by net.sourceforge.jdbdump.connect.FTPConfigurationIO

public class FTPConfigurationIO
extends ConfigurationIO

This class is a subclass of abstract ConfigurationIO class. It provides support for configuration files that are accessible throught FTP connection.

Author:
tymoteusz

Field Summary
protected  java.lang.String filename
           
protected  org.apache.commons.net.ftp.FTPClient ftp
           
protected  java.lang.String host
           
protected  java.lang.String password
           
protected  java.lang.String user
           
 
Constructor Summary
FTPConfigurationIO()
           
FTPConfigurationIO(java.lang.String host, java.lang.String filename, java.lang.String user, java.lang.String password)
           
 
Method Summary
protected  void connect()
           
 boolean getDefaultAutoload()
           
 boolean getDefaultAutosave()
           
protected  java.io.InputStream getInputStream()
          Implements method for gaining InputStream access to data through an FTP connection.
protected  java.io.OutputStream getOutputStream()
          Implements method for gaining OutputStream access to data through an FTP connection.
 
Methods inherited from class net.sourceforge.jdbdump.connect.ConfigurationIO
load, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

protected java.lang.String host

user

protected java.lang.String user

password

protected java.lang.String password

filename

protected java.lang.String filename

ftp

protected org.apache.commons.net.ftp.FTPClient ftp
Constructor Detail

FTPConfigurationIO

public FTPConfigurationIO()
                   throws java.io.FileNotFoundException,
                          java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

FTPConfigurationIO

public FTPConfigurationIO(java.lang.String host,
                          java.lang.String filename,
                          java.lang.String user,
                          java.lang.String password)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

connect

protected void connect()
                throws java.net.SocketException,
                       java.io.IOException
Throws:
java.net.SocketException
java.io.IOException

getInputStream

protected java.io.InputStream getInputStream()
                                      throws java.io.IOException
Implements method for gaining InputStream access to data through an FTP connection. Hostname, user, and filename on remote server are determined by host, user, and filename variables set with constructor.

Specified by:
getInputStream in class ConfigurationIO
Returns:
InputStream object from which configuration data can be retrieved
Throws:
java.io.FileNotFoundException
java.io.IOException
See Also:
#FTPConfigurationIO(String), ConfigurationIO#save()

getOutputStream

protected java.io.OutputStream getOutputStream()
                                        throws java.io.IOException
Implements method for gaining OutputStream access to data through an FTP connection. Hostname, user, and filename on remote server are determined by host, user, and filename variables set with constructor.

Specified by:
getOutputStream in class ConfigurationIO
Returns:
OutputStream object to which configuration data can be stored
Throws:
java.io.IOException
See Also:
#FTPConfigurationIO(String), ConfigurationIO#save()

getDefaultAutosave

public boolean getDefaultAutosave()
Overrides:
getDefaultAutosave in class ConfigurationIO

getDefaultAutoload

public boolean getDefaultAutoload()
Overrides:
getDefaultAutoload in class ConfigurationIO


Copyright © 2005-2006 AGH International University of Science and Technology. All Rights Reserved.