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 IArchiveFileprotected Stringthe archive file name.static final booleanstatic final booleanstatic final intstatic final org.eclipse.birt.core.archive.cache.SystemCacheManagerprotected Stringprotected static Fileprotected Stringprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionArchiveFile(String fileName, String mode) ArchiveFile(String systemId, String fileName, String mode) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close the archive.createEntry(String name) booleanvoidflush()longgetName()get the archive name.static longlonglistEntries(String namePattern) protected voidprotected voidvoidrefresh()booleanremoveEntry(String name) voidsave()save the file.voidvoidsetCacheSize(long cacheSize) static voidsetTempFileFolder(String folderPath) Sets the temporary file folder to contain temporary files.static voidsetTotalCacheSize(long size) voidunlockEntry(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:
getNamein interfaceIArchiveFile- Returns:
- archive name.
-
getDependId
- Specified by:
getDependIdin interfaceIArchiveFile
-
getSystemId
- Specified by:
getSystemIdin 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:
closein interfaceIArchiveFile- Throws:
IOException
-
setCacheSize
public void setCacheSize(long cacheSize) - Specified by:
setCacheSizein interfaceIArchiveFile
-
getUsedCache
public long getUsedCache()- Specified by:
getUsedCachein 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:
savein interfaceIArchiveFile- Throws:
IOException
-
flush
- Specified by:
flushin interfaceIArchiveFile- Throws:
IOException
-
refresh
- Specified by:
refreshin interfaceIArchiveFile- Throws:
IOException
-
exists
- Specified by:
existsin interfaceIArchiveFile
-
openEntry
- Specified by:
openEntryin interfaceIArchiveFile- Throws:
IOException
-
listEntries
- Specified by:
listEntriesin interfaceIArchiveFile
-
createEntry
- Specified by:
createEntryin interfaceIArchiveFile- Throws:
IOException
-
removeEntry
- Specified by:
removeEntryin interfaceIArchiveFile- Throws:
IOException
-
lockEntry
- Specified by:
lockEntryin interfaceIArchiveFile- Throws:
IOException
-
unlockEntry
- Specified by:
unlockEntryin interfaceIArchiveFile- Throws:
IOException
-
getLength
public long getLength()- Specified by:
getLengthin 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
-