Class Block
- java.lang.Object
-
- org.eclipse.birt.core.archive.cache.Cacheable
-
- org.eclipse.birt.core.archive.compound.Block
-
public class Block extends org.eclipse.birt.core.archive.cache.CacheableA physical block in a physical compound file, might be stream items block, index block or stream data block.
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOC_TABLE_BLOCKthe first block of allocation tablestatic intDEFAULT_BLOCK_SIZESize of a physical block, counted in bytes.static intDEFAULT_BUFFER_POOL_SIZEdefault size of buffer pool - number of buffer blocks in buffer poolstatic longDOCUMENT_TAGThe magic tag of the archive file: "RPTDOC"static longDOCUMENT_VERSION_0After support system id in archive file, DOCUMENT_VERSION_1 is writen into header.static longDOCUMENT_VERSION_1static intENTRY_ITEM_SIZEthe size of a entry in the entry table, counted in bytesstatic intENTRY_TABLE_BLOCKthe first block of entry tablestatic intFILE_STATUS_FINISHEDFile status value: finishedstatic intHEADER_BLOCKthe block of archive headerstatic intMIN_BUFFER_POOL_SIZEMin size of buffer pool - number of buffer blocks in buffer poolstatic java.lang.StringPROPERTY_DEFAULT_BLOCK_SIZEthe system property defines the block size, it should be times of 1024.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()byte[]getData()intread(int src, byte[] b, int off, int len)voidrefresh()intwrite(int tgt, byte[] b, int off, int len)
-
-
-
Field Detail
-
DOCUMENT_TAG
public static final long DOCUMENT_TAG
The magic tag of the archive file: "RPTDOC"- See Also:
- Constant Field Values
-
DOCUMENT_VERSION_0
public static final long DOCUMENT_VERSION_0
After support system id in archive file, DOCUMENT_VERSION_1 is writen into header.- See Also:
- Constant Field Values
-
DOCUMENT_VERSION_1
public static final long DOCUMENT_VERSION_1
- See Also:
- Constant Field Values
-
PROPERTY_DEFAULT_BLOCK_SIZE
public static final java.lang.String PROPERTY_DEFAULT_BLOCK_SIZE
the system property defines the block size, it should be times of 1024.- See Also:
- Constant Field Values
-
DEFAULT_BLOCK_SIZE
public static final int DEFAULT_BLOCK_SIZE
Size of a physical block, counted in bytes.- See Also:
- Constant Field Values
-
HEADER_BLOCK
public static final int HEADER_BLOCK
the block of archive header- See Also:
- Constant Field Values
-
ALLOC_TABLE_BLOCK
public static final int ALLOC_TABLE_BLOCK
the first block of allocation table- See Also:
- Constant Field Values
-
ENTRY_TABLE_BLOCK
public static final int ENTRY_TABLE_BLOCK
the first block of entry table- See Also:
- Constant Field Values
-
ENTRY_ITEM_SIZE
public static final int ENTRY_ITEM_SIZE
the size of a entry in the entry table, counted in bytes- See Also:
- Constant Field Values
-
FILE_STATUS_FINISHED
public static final int FILE_STATUS_FINISHED
File status value: finished- See Also:
- Constant Field Values
-
DEFAULT_BUFFER_POOL_SIZE
public static final int DEFAULT_BUFFER_POOL_SIZE
default size of buffer pool - number of buffer blocks in buffer pool- See Also:
- Constant Field Values
-
MIN_BUFFER_POOL_SIZE
public static final int MIN_BUFFER_POOL_SIZE
Min size of buffer pool - number of buffer blocks in buffer pool- See Also:
- Constant Field Values
-
-
Method Detail
-
refresh
public void refresh() throws java.io.IOException- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Throws:
java.io.IOException
-
getData
public byte[] getData()
-
write
public int write(int tgt, byte[] b, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read(int src, byte[] b, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
-