|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.bs.mdi.FileIOManager
Manages File I/O modules
| Field Summary | |
static int |
EXPORT
|
static int |
OPEN
|
static int |
SAVE
|
| Constructor Summary | |
FileIOManager()
Creates a new file I/O manager. |
|
| Method Summary | |
boolean |
canExport()
Determines if the file manager is able to export a file. |
boolean |
canLoad()
Determines if the file manager is able to load a file. |
boolean |
canSave()
Determines if the file manager is able to save a file. |
int |
countAllModules()
Counts all registered modules. |
int |
countExporters()
Counts all registered FileExporter modules. |
int |
countLoaders()
Counts all registered FileLoader modules. |
int |
countSavers()
Counts all registered FileSaver modules. |
void |
export(RootData data,
FileExporter exporter)
Exports the data using the specified exporter module. |
boolean |
fileExists(String filename)
Returns true if the given file exists. |
FileExporter[] |
getFileExporters()
Returns a list of all registered file exporter modules. |
FileLoader[] |
getFileLoaders()
Returns a list of all registered file loader modules. |
FileSaver[] |
getFileSavers()
Returns a list of all registered file saver modules. |
FileIOModule |
getIOModule(FileFormat format,
int mode)
Looks up a file I/O module for the specified format. |
FileFormat[] |
getSupportedFormats(int mode)
Returns a list of all supported formats for loading, saving or exporting data. |
boolean |
isReady()
Returns true if this file I/O manager is "ready". |
RootData |
load(String filename)
Tries to load data from disk. |
RootData |
load(String filename,
FileLoader loader)
Tries to load data from disk using the specified loader module. |
void |
registerAllModules(FileIOModule[] modules)
Registers all given file I/O modules in the given array. |
void |
registerModule(FileIOModule module)
Registers a file I/O module. |
void |
save(RootData data,
String filename)
Tries to save a document to disk. |
void |
save(RootData data,
String filename,
FileSaver saver)
Tries to save a document to disk using the specified saver module. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int OPEN
public static final int SAVE
public static final int EXPORT
| Constructor Detail |
public FileIOManager()
| Method Detail |
public RootData load(String filename,
FileLoader loader)
throws FileIOException
filename - the filename to be openedloader - the loader module
FileIOException
public RootData load(String filename)
throws FileIOException
filename - the filename to be opened
FileIOException
public void save(RootData data,
String filename,
FileSaver saver)
throws FileIOException
data - the document data to be savedfilename - the filename to be written tosaver - the saver I/O module
FileIOException
public void save(RootData data,
String filename)
throws FileIOException
data - the document data to be savedfilename - the filename to be written to
FileIOException
public void export(RootData data,
FileExporter exporter)
throws FileIOException
data - the document data to be exportedexporter - the exporter module to be used
FileIOExceptionpublic FileLoader[] getFileLoaders()
public FileSaver[] getFileSavers()
public FileExporter[] getFileExporters()
public FileFormat[] getSupportedFormats(int mode)
mode - OPEN, SAVE or EXPORT
public FileIOModule getIOModule(FileFormat format,
int mode)
format - the file formatmode - OPEN, SAVE or EXPORT
public void registerModule(FileIOModule module)
module - the module to be registeredpublic void registerAllModules(FileIOModule[] modules)
modules - the file I/O modules to be registeredpublic boolean isReady()
public boolean canLoad()
public boolean canSave()
public boolean canExport()
public boolean fileExists(String filename)
filename - the filename
public int countLoaders()
public int countSavers()
public int countExporters()
public int countAllModules()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||