Interface IArchiveFileFactory
- All Known Implementing Classes:
ArchiveFileFactory
public interface IArchiveFileFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreateArchive
(String archiveId) Create an archive file.createTransientArchive
(String archiveId) Create an archive in transient mode.createTransientView
(String viewId, IArchiveFile archive) Create a transient view.createView
(String viewId, IArchiveFile archive) Create a view, the view uses "viewId" as the identifier and saved into file "filename".openArchive
(String archiveId, String mode) Open the archive or view.openView
(String viewId, String mode, IArchiveFile archive) Open the view with viewId inmode
mode, the depend archive file is opened in r mode, and is shared.
-
Method Details
-
openArchive
Open the archive or view. The mode can be either: - "r" the archive file is opened for read only. - "rw" the archive file is opened for read and write. - "rw+" the archive file is opened for read and append. 1. in "r" mode a. view: open view in r mode, and open archive in r mode at the same time. b. archive: open archive in r mode directly. 2. in "rw" mode a. view&archive: only create new archive file 3. in "rw+" a. view: open view in rw+ mode, and open archive in r mode at the same time. b. archive: open archive in rw+ mode.- Parameters:
archiveId
- the system id of the opening archivemode
- opening mode- Returns:
- opened archive
- Throws:
IOException
-
openView
Open the view with viewId inmode
mode, the depend archive file is opened in r mode, and is shared. The mode can be either: - "r" the view file is opened for read only. - "rw" the view file is opened for read and write. - "rw+" the view file is opened for read and append. The depend archive file will not be closed when view file is closed.- Parameters:
viewId
- the system id of the opening viewmode
- opening modearchive
- depend archive file- Returns:
- opened view
- Throws:
IOException
-
createArchive
Create an archive file. The created archive usesarchiveId
as the identifier. If the file has exist already, the file is removed first. It can only be used to create an archive. To create a view, the user needs use createView.- Parameters:
archiveId
- the system id of the new archive filefileName
- the file name of the archive file- Returns:
- an archive file with the
archiveId
- Throws:
IOException
-
createTransientArchive
Create an archive in transient mode.- Parameters:
archiveId
-fileName
-- Returns:
- Throws:
IOException
-
createView
Create a view, the view uses "viewId" as the identifier and saved into file "filename". The base archive "archive" can be either a view or an archive. If it is a view, the new generated view is based on the original archive.- Parameters:
viewId
- the system id of the new view filearchive
- the depended archive file instance- Returns:
- Throws:
IOException
-
createTransientView
Create a transient view.- Parameters:
viewId
- the system id of the new view filearchive
- the depended archive file instance- Returns:
- Throws:
IOException
-