Package org.eclipse.birt.core.archive.compound

# 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.Cacheable
A 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 final int`
`ALLOC_TABLE_BLOCK`
the first block of allocation table
`static final int`
`DEFAULT_BLOCK_SIZE`
Size of a physical block, counted in bytes.
`static final int`
`DEFAULT_BUFFER_POOL_SIZE`
default size of buffer pool - number of buffer blocks in buffer pool
`static final long`
`DOCUMENT_TAG`
The magic tag of the archive file: "RPTDOC"
`static final long`
`DOCUMENT_VERSION_0`
After support system id in archive file, DOCUMENT_VERSION_1 is writen into header.
`static final long`
`DOCUMENT_VERSION_1`
`static final int`
`ENTRY_ITEM_SIZE`
the size of a entry in the entry table, counted in bytes
`static final int`
`ENTRY_TABLE_BLOCK`
the first block of entry table
`static final int`
`FILE_STATUS_FINISHED`
File status value: finished
`static final int`
`HEADER_BLOCK`
the block of archive header
`static final int`
`MIN_BUFFER_POOL_SIZE`
Min size of buffer pool - number of buffer blocks in buffer pool
`static final String`
`PROPERTY_DEFAULT_BLOCK_SIZE`
the system property defines the block size, it should be times of 1024.

### Fields inherited from class org.eclipse.birt.core.archive.cache.Cacheable

`cacheKey, manager, next, prev, referenceCount`

## Method Summary

Modifier and Type
Method
Description
`void`
`flush()`
`byte[]`
`getData()`
`int`
`read(int src, byte[] b, int off, int len)`
`void`
`refresh()`
`int`
`write(int tgt, byte[] b, int off, int len)`

### Methods inherited from class org.eclipse.birt.core.archive.cache.Cacheable

`getCacheKey, getNext, getPrev, getReferenceCount, setNext, setPrev`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DOCUMENT_TAG

static final long DOCUMENT_TAG
The magic tag of the archive file: "RPTDOC"

See Also:
  - Constant Field Values

### DOCUMENT_VERSION_0

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

static final long DOCUMENT_VERSION_1

See Also:
  - Constant Field Values

### PROPERTY_DEFAULT_BLOCK_SIZE

static final 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

static final int DEFAULT_BLOCK_SIZE
Size of a physical block, counted in bytes.

See Also:
  - Constant Field Values

### HEADER_BLOCK

static final int HEADER_BLOCK
the block of archive header

See Also:
  - Constant Field Values

### ALLOC_TABLE_BLOCK

static final int ALLOC_TABLE_BLOCK
the first block of allocation table

See Also:
  - Constant Field Values

### ENTRY_TABLE_BLOCK

static final int ENTRY_TABLE_BLOCK
the first block of entry table

See Also:
  - Constant Field Values

### ENTRY_ITEM_SIZE

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

static final int FILE_STATUS_FINISHED
File status value: finished

See Also:
  - Constant Field Values

### DEFAULT_BUFFER_POOL_SIZE

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

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 Details

### refresh

public void refresh() throws IOException

Throws:
  `IOException`

### flush

public void flush() throws IOException

Throws:
  `IOException`

### getData

public byte[] getData()

### write

public int write(int tgt, byte[] b, int off, int len) throws IOException

Throws:
  `IOException`

### read

public int read(int src, byte[] b, int off, int len) throws IOException

Throws:
  `IOException`