Class ArchiveFileV1
- java.lang.Object
-
- org.eclipse.birt.core.archive.compound.ArchiveFileV1
-
- All Implemented Interfaces:
IArchiveFile
public class ArchiveFileV1 extends java.lang.Object implements IArchiveFile
-
-
Constructor Summary
Constructors Constructor Description ArchiveFileV1(java.lang.String archiveName)ArchiveFileV1(java.lang.String archiveName, java.io.RandomAccessFile rf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ArchiveEntrycreateEntry(java.lang.String name)booleanexists(java.lang.String name)voidflush()java.lang.StringgetDependId()longgetLength()java.lang.StringgetName()java.lang.StringgetSystemId()longgetUsedCache()java.util.List<java.lang.String>listEntries(java.lang.String namePattern)java.lang.ObjectlockEntry(java.lang.String stream)ArchiveEntryopenEntry(java.lang.String name)protected voidreadFileTable()read the stream table from the archive file.voidrefresh()booleanremoveEntry(java.lang.String name)voidsave()voidsetCacheSize(long cacheSize)voidunlockEntry(java.lang.Object locker)
-
-
-
Method Detail
-
readFileTable
protected void readFileTable() throws java.io.IOExceptionread the stream table from the archive file. the stream table is in the begining of the file, it contains: long: stream section postiton, always zero. long: entry number. followed by entries in the archive, each entry contains: utf8: stream name. long[2]: start offset, length.- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceIArchiveFile
-
getDependId
public java.lang.String getDependId()
- Specified by:
getDependIdin interfaceIArchiveFile
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemIdin interfaceIArchiveFile
-
close
public void close() throws java.io.IOException- Specified by:
closein interfaceIArchiveFile- Throws:
java.io.IOException
-
setCacheSize
public void setCacheSize(long cacheSize)
- Specified by:
setCacheSizein interfaceIArchiveFile
-
getUsedCache
public long getUsedCache()
- Specified by:
getUsedCachein interfaceIArchiveFile
-
createEntry
public ArchiveEntry createEntry(java.lang.String name) throws java.io.IOException
- Specified by:
createEntryin interfaceIArchiveFile- Throws:
java.io.IOException
-
exists
public boolean exists(java.lang.String name)
- Specified by:
existsin interfaceIArchiveFile
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfaceIArchiveFile- Throws:
java.io.IOException
-
openEntry
public ArchiveEntry openEntry(java.lang.String name) throws java.io.IOException
- Specified by:
openEntryin interfaceIArchiveFile- Throws:
java.io.IOException
-
listEntries
public java.util.List<java.lang.String> listEntries(java.lang.String namePattern)
- Specified by:
listEntriesin interfaceIArchiveFile
-
refresh
public void refresh() throws java.io.IOException- Specified by:
refreshin interfaceIArchiveFile- Throws:
java.io.IOException
-
removeEntry
public boolean removeEntry(java.lang.String name) throws java.io.IOException- Specified by:
removeEntryin interfaceIArchiveFile- Throws:
java.io.IOException
-
lockEntry
public java.lang.Object lockEntry(java.lang.String stream) throws java.io.IOException- Specified by:
lockEntryin interfaceIArchiveFile- Throws:
java.io.IOException
-
unlockEntry
public void unlockEntry(java.lang.Object locker) throws java.io.IOException- Specified by:
unlockEntryin interfaceIArchiveFile- Throws:
java.io.IOException
-
getLength
public long getLength()
- Specified by:
getLengthin interfaceIArchiveFile
-
save
public void save() throws java.io.IOException- Specified by:
savein interfaceIArchiveFile- Throws:
java.io.IOException
-
-