net.dontdrinkandroot.cache.impl.disk.indexed.storage

## Class IndexData

- java.lang.Object
- - net.dontdrinkandroot.cache.impl.disk.indexed.storage.IndexData

    public class IndexData
    extends Object

### Field Summary

Fields
`int` `blockNum`
`DataBlock` `keyMetaBlock`
`static long` `LENGTH`
`DataBlock` `valueBlock`

### Constructor Summary

Constructors
Constructor and Description
`IndexData(DataBlock keyMetaBlock, DataBlock valueBlock)`
`IndexData(int blockNum, DataBlock keyMetaBlock, DataBlock valueBlock)`

### Method Summary

Methods
`int` `getBlockNum()`
`DataBlock` `getKeyMetaBlock()`
`DataBlock` `getValueBlock()`
`static IndexData` `read(RandomAccessFile randomAccessFile, int blockNum)`
`void` `setBlockNum(int blockNum)`
`String` `toString()`
`IndexData` `write(RandomAccessFile randomAccessFile, int blockNum)`

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

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

### Field Detail

#### LENGTH

    public static final long LENGTH

See Also:
  Constant Field Values

#### blockNum

    public int blockNum

#### keyMetaBlock

    public DataBlock keyMetaBlock

#### valueBlock

    public DataBlock valueBlock

### Constructor Detail

#### IndexData

    public IndexData(int blockNum,
             DataBlock keyMetaBlock,
             DataBlock valueBlock)

#### IndexData

    public IndexData(DataBlock keyMetaBlock,
             DataBlock valueBlock)

### Method Detail

#### getBlockNum

    public int getBlockNum()

#### setBlockNum

    public void setBlockNum(int blockNum)

#### getKeyMetaBlock

    public DataBlock getKeyMetaBlock()

#### getValueBlock

    public DataBlock getValueBlock()

#### read

    public static IndexData read(RandomAccessFile randomAccessFile,
                 int blockNum)
                          throws IOException

Throws:
  `IOException`

#### write

    public IndexData write(RandomAccessFile randomAccessFile,
                  int blockNum)
                    throws IOException

Throws:
  `IOException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`