|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.birt.core.archive.compound.ArchiveFileV2
public class ArchiveFileV2
the archive file contains following mode:
| Field Summary | |
|---|---|
static int |
ALLOC_TABLE_BLOCK
the first block of allocation table |
protected org.eclipse.birt.core.archive.compound.AllocTable |
allocTbl
allocation table of the archive file |
protected java.lang.String |
archiveName
the archive file name. |
protected int |
BLOCK_SIZE
|
protected org.eclipse.birt.core.archive.cache.FileCacheManager |
caches
cache manager of the archive file. |
static int |
DEFAULT_BLOCK_SIZE
Size of a physical block, counted in bytes. |
static int |
DEFAULT_BUFFER_POOL_SIZE
default size of buffer pool - number of buffer blocks in buffer pool |
protected java.lang.String |
dependId
|
static long |
DOCUMENT_TAG
The magic tag of the archive file: "RPTDOC" |
static long |
DOCUMENT_VERSION_0
After support system id in archive file, DOCUMENT_VERSION_1 is writen into header. |
static long |
DOCUMENT_VERSION_1
|
protected java.util.HashMap<java.lang.String,org.eclipse.birt.core.archive.compound.NameEntry> |
entries
archive entries in the table |
static int |
ENTRY_ITEM_SIZE
the size of a entry in the entry table, counted in bytes |
static int |
ENTRY_TABLE_BLOCK
the first block of entry table |
protected org.eclipse.birt.core.archive.compound.NameTable |
entryTbl
entry table of the archive file |
static int |
FILE_STATUS_FINISHED
File status value: finished |
protected org.eclipse.birt.core.archive.compound.ArchiveHeader |
head
header status |
static int |
HEADER_BLOCK
the block of archive header |
protected boolean |
isAppend
the archive file is appended. |
protected boolean |
isClosed
if the file is closed. |
protected boolean |
isTransient
the archive file is transient. |
protected boolean |
isWritable
the archive file is writable. |
static int |
MIN_BUFFER_POOL_SIZE
Min size of buffer pool - number of buffer blocks in buffer pool |
static java.lang.String |
PROPERTY_DEFAULT_BLOCK_SIZE
the system property defines the block size, it should be times of 1024. |
protected java.io.RandomAccessFile |
rf
the physical file correspond to this compound file system |
protected java.lang.String |
systemId
|
protected int |
totalBlocks
the total blocks exits in this file |
protected int |
totalDiskBlocks
the total blocks exits in the disk |
| Constructor Summary | |
|---|---|
ArchiveFileV2(java.lang.String fileName,
java.io.RandomAccessFile rf,
java.lang.String mode)
create the archive file. |
|
ArchiveFileV2(java.lang.String fileName,
java.lang.String mode)
|
|
ArchiveFileV2(java.lang.String systemId,
java.lang.String fileName,
java.lang.String mode)
|
|
ArchiveFileV2(java.lang.String systemId,
java.lang.String dependId,
java.lang.String fileName,
java.io.RandomAccessFile rf,
java.lang.String mode)
create the archive file. |
|
ArchiveFileV2(java.lang.String systemId,
java.lang.String dependId,
java.lang.String fileName,
java.lang.String mode)
|
|
| Method Summary | |
|---|---|
void |
close()
close the archive. |
protected Block |
createBlock()
|
ArchiveEntry |
createEntry(java.lang.String name)
|
boolean |
exists(java.lang.String name)
|
void |
flush()
|
java.lang.String |
getDependId()
|
java.lang.String |
getName()
get the archive name. |
java.lang.String |
getSystemId()
|
long |
getUsedCache()
|
java.util.List |
listEntries(java.lang.String namePattern)
|
java.lang.Object |
lockEntry(java.lang.String name)
|
ArchiveEntry |
openEntry(java.lang.String name)
|
void |
refresh()
|
boolean |
removeEntry(java.lang.String name)
|
void |
save()
|
void |
setCacheSize(long cacheSize)
set up the cache size. |
protected void |
unloadBlock(Block block)
|
void |
unlockEntry(java.lang.Object locker)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.RandomAccessFile rf
protected boolean isClosed
protected boolean isWritable
protected boolean isTransient
protected boolean isAppend
protected java.lang.String archiveName
protected java.lang.String systemId
protected java.lang.String dependId
protected int BLOCK_SIZE
protected org.eclipse.birt.core.archive.compound.ArchiveHeader head
protected org.eclipse.birt.core.archive.compound.AllocTable allocTbl
protected org.eclipse.birt.core.archive.compound.NameTable entryTbl
protected java.util.HashMap<java.lang.String,org.eclipse.birt.core.archive.compound.NameEntry> entries
protected org.eclipse.birt.core.archive.cache.FileCacheManager caches
protected int totalBlocks
protected int totalDiskBlocks
public static final long DOCUMENT_TAG
public static final long DOCUMENT_VERSION_0
public static final long DOCUMENT_VERSION_1
public static final java.lang.String PROPERTY_DEFAULT_BLOCK_SIZE
public static final int DEFAULT_BLOCK_SIZE
public static final int HEADER_BLOCK
public static final int ALLOC_TABLE_BLOCK
public static final int ENTRY_TABLE_BLOCK
public static final int ENTRY_ITEM_SIZE
public static final int FILE_STATUS_FINISHED
public static final int DEFAULT_BUFFER_POOL_SIZE
public static final int MIN_BUFFER_POOL_SIZE
| Constructor Detail |
|---|
public ArchiveFileV2(java.lang.String fileName,
java.io.RandomAccessFile rf,
java.lang.String mode)
throws java.io.IOException
fileName - file name.rf - the random access filemode - open mode.
java.io.IOException
public ArchiveFileV2(java.lang.String fileName,
java.lang.String mode)
throws java.io.IOException
java.io.IOException
public ArchiveFileV2(java.lang.String systemId,
java.lang.String fileName,
java.lang.String mode)
throws java.io.IOException
java.io.IOException
public ArchiveFileV2(java.lang.String systemId,
java.lang.String dependId,
java.lang.String fileName,
java.lang.String mode)
throws java.io.IOException
java.io.IOException
public ArchiveFileV2(java.lang.String systemId,
java.lang.String dependId,
java.lang.String fileName,
java.io.RandomAccessFile rf,
java.lang.String mode)
throws java.io.IOException
fileName - file name.mode - open mode.
java.io.IOException| Method Detail |
|---|
public void setCacheSize(long cacheSize)
setCacheSize in interface IArchiveFilecacheSize - cache size in bytespublic long getUsedCache()
getUsedCache in interface IArchiveFilepublic java.lang.String getDependId()
getDependId in interface IArchiveFilepublic java.lang.String getSystemId()
getSystemId in interface IArchiveFilepublic java.lang.String getName()
getName in interface IArchiveFile
public void close()
throws java.io.IOException
close in interface IArchiveFilejava.io.IOException
public void flush()
throws java.io.IOException
flush in interface IArchiveFilejava.io.IOException
public void save()
throws java.io.IOException
save in interface IArchiveFilejava.io.IOException
public void refresh()
throws java.io.IOException
refresh in interface IArchiveFilejava.io.IOExceptionpublic boolean exists(java.lang.String name)
exists in interface IArchiveFilepublic ArchiveEntry openEntry(java.lang.String name) throws java.io.IOException
openEntry in interface IArchiveFilejava.io.IOExceptionpublic java.util.List listEntries(java.lang.String namePattern)
listEntries in interface IArchiveFilepublic ArchiveEntry createEntry(java.lang.String name) throws java.io.IOException
createEntry in interface IArchiveFilejava.io.IOException
public boolean removeEntry(java.lang.String name)
throws java.io.IOException
removeEntry in interface IArchiveFilejava.io.IOException
public java.lang.Object lockEntry(java.lang.String name)
throws java.io.IOException
lockEntry in interface IArchiveFilejava.io.IOException
public void unlockEntry(java.lang.Object locker)
throws java.io.IOException
unlockEntry in interface IArchiveFilejava.io.IOExceptionprotected Block createBlock() throws java.io.IOException
java.io.IOExceptionprotected void unloadBlock(Block block) throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||