net.sourceforge.jdbdump.connect
Class FilesystemConfigurationIO

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

public class FilesystemConfigurationIO
extends ConfigurationIO

This is an implementation of ConfigurationIO abstract class, which is ment to be use for accessing configuration data stored in file on local filesystem.

Author:
tymoteusz
See Also:
ConfigurationIO

Field Summary
protected  java.lang.String filename
           
 
Constructor Summary
FilesystemConfigurationIO()
          Constructor which uses default system filename (taken from system properties) for configuration file.
FilesystemConfigurationIO(java.lang.String filename)
          Constructor with explicitly specified filename of configuration file
 
Method Summary
protected  java.io.InputStream getInputStream()
          Implements method for gaining InputStream access to data through a file on local filesystem.
protected  java.io.OutputStream getOutputStream()
          Implements method for gaining OutputStream access to data through a file on local filesystem.
 
Methods inherited from class net.sourceforge.jdbdump.connect.ConfigurationIO
getDefaultAutoload, getDefaultAutosave, load, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

protected java.lang.String filename
Constructor Detail

FilesystemConfigurationIO

public FilesystemConfigurationIO()
                          throws java.io.IOException
Constructor which uses default system filename (taken from system properties) for configuration file.

Throws:
java.io.IOException - if cannot load configuration data due to I/O problems.

FilesystemConfigurationIO

public FilesystemConfigurationIO(java.lang.String filename)
                          throws java.io.IOException
Constructor with explicitly specified filename of configuration file

Parameters:
filename - name of a file on the local filesystem, where configuration is stored
Throws:
java.io.IOException - if reading data from configuration file fails.
Method Detail

getInputStream

protected java.io.InputStream getInputStream()
Implements method for gaining InputStream access to data through a file on local filesystem. Filename is determined by filename variable set with constructor.

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

getOutputStream

protected java.io.OutputStream getOutputStream()
                                        throws java.io.FileNotFoundException
Implements method for gaining OutputStream access to data through a file on local filesystem. Filename is determined by filename variable set with constructor.

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


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