class CASAFileBlock extends Object
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Modifier and Type | Field and Description |
---|---|
protected byte[] |
data |
static long |
DEFAULT_BLOCK_SIZE |
protected CASAFileBlockHeader |
header |
Modifier | Constructor and Description |
---|---|
protected |
CASAFileBlock() |
|
CASAFileBlock(byte[] dataBytes) |
protected |
CASAFileBlock(CASAFileBlockHeader aHeader) |
protected |
CASAFileBlock(CASAFileBlockHeader aHeader,
int[] theData) |
|
CASAFileBlock(int dataSize)
construct a file block that contains a data area of size >= dataSize
|
protected |
CASAFileBlock(long indexOffset,
byte[] dataBytes) |
protected |
CASAFileBlock(long indexOffset,
byte[] dataBytes,
int start,
int dataCount) |
Modifier and Type | Method and Description |
---|---|
long |
dataLength() |
byte[] |
getBytes() |
byte[] |
getDataBytes() |
CASAFileBlockHeader |
getHeader() |
long |
length() |
public static final long DEFAULT_BLOCK_SIZE
protected CASAFileBlockHeader header
protected byte[] data
public CASAFileBlock(int dataSize) throws CASAIOException
CASAIOException
public CASAFileBlock(byte[] dataBytes) throws CASAIOException
CASAIOException
protected CASAFileBlock()
protected CASAFileBlock(CASAFileBlockHeader aHeader)
protected CASAFileBlock(CASAFileBlockHeader aHeader, int[] theData)
protected CASAFileBlock(long indexOffset, byte[] dataBytes) throws CASAIOException
CASAIOException
protected CASAFileBlock(long indexOffset, byte[] dataBytes, int start, int dataCount) throws CASAIOException
CASAIOException
public CASAFileBlockHeader getHeader()
public long length()
public long dataLength()
public byte[] getDataBytes()
public byte[] getBytes()