JAligner

jaligner.ui.filechooser
Class FileChooser

java.lang.Object
  extended byjaligner.ui.filechooser.FileChooser
Direct Known Subclasses:
FileChooserJNLP, FileChooserTrusted

public abstract class FileChooser
extends java.lang.Object

Opens and saves files.

Author:
Ahmed Moustafa (ahmed@users.sf.net)

Field Summary
static int BUFFER_SIZE
          Buffer size while reading from or write to a file (4 KB)
 
Constructor Summary
FileChooser()
           
 
Method Summary
 java.lang.String getUserDirectory()
          Gets the current user working directory
abstract  NamedInputStream open()
          Shows a dialog to select a file
abstract  boolean save(java.io.InputStream is, java.lang.String fileName)
          Saves an input stream to a file
 void setUserDirectory(java.lang.String userDir)
          Sets the user working directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE
Buffer size while reading from or write to a file (4 KB)

See Also:
Constant Field Values
Constructor Detail

FileChooser

public FileChooser()
Method Detail

open

public abstract NamedInputStream open()
                               throws FileChooserException
Shows a dialog to select a file

Returns:
InputStream
Throws:
FileChooserException

save

public abstract boolean save(java.io.InputStream is,
                             java.lang.String fileName)
                      throws FileChooserException
Saves an input stream to a file

Parameters:
is -
fileName -
Returns:
boolean
Throws:
FileChooserException

getUserDirectory

public java.lang.String getUserDirectory()
Gets the current user working directory

Returns:
current working directory

setUserDirectory

public void setUserDirectory(java.lang.String userDir)
Sets the user working directory

Parameters:
userDir - The user directory to set

JAligner

Ahmed Moustafa (ahmed@users.sf.net)SourceForge.net
The source code of JAligner is licensed under The GNU General Public License (GPL)