Class ArchiveFile
java.lang.Object
org.eclipse.birt.core.archive.compound.ArchiveFile
- All Implemented Interfaces:
IArchiveFile
change the default format to ext2.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IArchiveFile
protected String
the archive file name.static final boolean
static final boolean
static final int
static final org.eclipse.birt.core.archive.cache.SystemCacheManager
protected String
protected static File
protected String
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionArchiveFile
(String fileName, String mode) ArchiveFile
(String systemId, String fileName, String mode) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
close the archive.createEntry
(String name) boolean
void
flush()
long
getName()
get the archive name.static long
long
listEntries
(String namePattern) protected void
protected void
void
refresh()
boolean
removeEntry
(String name) void
save()
save the file.void
void
setCacheSize
(long cacheSize) static void
setTempFileFolder
(String folderPath) Sets the temporary file folder to contain temporary files.static void
setTotalCacheSize
(long size) void
unlockEntry
(Object locker) protected void
-
Field Details
-
enableSystemCache
public static final boolean enableSystemCache- See Also:
-
systemCacheManager
public static final org.eclipse.birt.core.archive.cache.SystemCacheManager systemCacheManager -
enableFileCache
public static final boolean enableFileCache- See Also:
-
FILE_CACHE_SIZE
public static final int FILE_CACHE_SIZE- See Also:
-
archiveName
the archive file name. -
systemId
-
zipOnClose
protected boolean zipOnClose -
tmpFileName
-
tmpFileFolder
-
af
-
-
Constructor Details
-
ArchiveFile
- Throws:
IOException
-
ArchiveFile
- Throws:
IOException
-
-
Method Details
-
openArchiveForReading
- Throws:
IOException
-
openArchiveForAppending
- Throws:
IOException
-
getName
get the archive name. the archive name is the file name used to create the archive instance.- Specified by:
getName
in interfaceIArchiveFile
- Returns:
- archive name.
-
getDependId
- Specified by:
getDependId
in interfaceIArchiveFile
-
getSystemId
- Specified by:
getSystemId
in interfaceIArchiveFile
-
close
close the archive. all changed data will be flushed into disk if the file is opened for write. the file will be removed if it is opend as transient. after close, the instance can't be used any more.- Specified by:
close
in interfaceIArchiveFile
- Throws:
IOException
-
setCacheSize
public void setCacheSize(long cacheSize) - Specified by:
setCacheSize
in interfaceIArchiveFile
-
getUsedCache
public long getUsedCache()- Specified by:
getUsedCache
in interfaceIArchiveFile
-
getTotalUsedCache
public static long getTotalUsedCache() -
setTotalCacheSize
public static void setTotalCacheSize(long size) -
saveAs
- Throws:
IOException
-
save
save the file. If the file is transient file, after saving, it will be converts to normal file.- Specified by:
save
in interfaceIArchiveFile
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceIArchiveFile
- Throws:
IOException
-
refresh
- Specified by:
refresh
in interfaceIArchiveFile
- Throws:
IOException
-
exists
- Specified by:
exists
in interfaceIArchiveFile
-
openEntry
- Specified by:
openEntry
in interfaceIArchiveFile
- Throws:
IOException
-
listEntries
- Specified by:
listEntries
in interfaceIArchiveFile
-
createEntry
- Specified by:
createEntry
in interfaceIArchiveFile
- Throws:
IOException
-
removeEntry
- Specified by:
removeEntry
in interfaceIArchiveFile
- Throws:
IOException
-
lockEntry
- Specified by:
lockEntry
in interfaceIArchiveFile
- Throws:
IOException
-
unlockEntry
- Specified by:
unlockEntry
in interfaceIArchiveFile
- Throws:
IOException
-
getLength
public long getLength()- Specified by:
getLength
in interfaceIArchiveFile
-
unzip
- Throws:
IOException
-
setTempFileFolder
Sets the temporary file folder to contain temporary files. This folder should be maintained by caller to clean up. If not set, default temporary file folder will be used as defined by JDK. See javadoc inFile.createTempFile(String, String, File)
- Parameters:
folderPath
- folder path
-