|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFileManager
A FileManager specification.
Nested Class Summary | |
---|---|
static class |
IFileManager.JTDVersion
JTD File versions. |
static class |
IFileManager.XmlBackupVersion
XML Backup versions. |
Field Summary | |
---|---|
static int |
CONTENT
|
static long |
JTCATEGORYSEPARATOR
|
static long |
JTINTERNSEPARATOR
|
static java.lang.String |
JTKEY
|
static int |
NOCONTENT
|
static java.lang.String |
UTFNULL
|
Method Summary | |
---|---|
void |
backup(FileType format,
java.io.File file)
Backup to a File with a specific format. |
java.lang.String |
formatUTFToRead(java.lang.String utf)
Format an UTF string after read it in a file to get the good value. |
java.lang.String |
formatUTFToWrite(java.lang.String utf)
Format an UTF string before insert it in a file to be sure that it isn't empty. |
java.util.List<BackupReader> |
getBackupReaders(FileType format)
Return all the backupers of a specific format. |
boolean |
isBackupPossible(FileType type)
Indicate if the backup is possible for the specified file type. |
boolean |
isRestorePossible(FileType type)
Indicate if the restore is possible for the specified file type. |
void |
registerBackupReader(FileType format,
BackupReader reader)
Register a new BackupReader. |
void |
registerBackupWriter(FileType format,
BackupWriter writer)
Register a new BackupWriter. |
void |
restore(FileType format,
java.io.File file)
Restore the data from a File with a specific format. |
void |
unregisterBackupReader(FileType format,
BackupReader reader)
Unregister a BackupReader. |
void |
unregisterBackupWriter(FileType format,
BackupWriter writer)
Unregister a BackupWriter. |
Methods inherited from interface org.jtheque.core.managers.ActivableManager |
---|
isEnabled, setEnabled |
Methods inherited from interface org.jtheque.core.managers.IManager |
---|
close, init, preInit |
Field Detail |
---|
static final long JTCATEGORYSEPARATOR
static final long JTINTERNSEPARATOR
static final int CONTENT
static final int NOCONTENT
static final java.lang.String UTFNULL
static final java.lang.String JTKEY
Method Detail |
---|
java.lang.String formatUTFToWrite(java.lang.String utf)
utf
- The UTF string.
java.lang.String formatUTFToRead(java.lang.String utf)
utf
- The UTF string.
void backup(FileType format, java.io.File file) throws org.jtheque.utils.io.FileException
format
- The format of the backup.file
- The file to backup to.
org.jtheque.utils.io.FileException
- Thrown when an error occurs during the backup process.void restore(FileType format, java.io.File file) throws org.jtheque.utils.io.FileException
format
- The format of the backup.file
- The file to restore from.
org.jtheque.utils.io.FileException
- Thrown when an error occurs during the restore process.void registerBackupWriter(FileType format, BackupWriter writer)
format
- The format the BackupWriter manage.writer
- The writer to register.void registerBackupReader(FileType format, BackupReader reader)
format
- The format the BackupReader manage.reader
- The reader to register.void unregisterBackupWriter(FileType format, BackupWriter writer)
format
- The format the BackupWriter manage.writer
- The writer to unregister.void unregisterBackupReader(FileType format, BackupReader reader)
format
- The format the BackupReader manage.reader
- The reader to unregister.java.util.List<BackupReader> getBackupReaders(FileType format)
format
- The format.
boolean isBackupPossible(FileType type)
type
- The file type to test.
boolean isRestorePossible(FileType type)
type
- The file type to test.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |