public class DataBlockEntityFile extends AbstractEntityFile<DataBlock>
| Modifier and Type | Field and Description |
|---|---|
static byte |
END_HEADER |
static byte |
EOF_FILE |
static byte |
LEN_HEADER |
static byte |
REMOVED_STATUS |
static byte |
USED_STATUS |
batchLength, file, fileAccess, firstRecord, offset, recordLength| Constructor and Description |
|---|
DataBlockEntityFile(File file,
int blockSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlockSize() |
ReadWriteLock |
getLock() |
protected DataBlock |
read(DataInputStream stream) |
protected void |
readMetaData(DataInputStream stream) |
protected void |
write(DataOutputStream stream,
DataBlock entity) |
protected void |
writeEOF(DataOutputStream stream) |
protected void |
writeHeader() |
protected void |
writeMetaData(DataOutputStream stream) |
batchWrite, close, createNewFile, delete, exists, flush, getAbsoluteFile, getAbsolutePath, getBatchLength, getName, getOffset, length, open, read, readHeader, seek, setBatchLength, setLength, writepublic static final byte LEN_HEADER
public static final byte END_HEADER
public static final byte EOF_FILE
public static final byte REMOVED_STATUS
public static final byte USED_STATUS
public DataBlockEntityFile(File file, int blockSize)
protected void writeEOF(DataOutputStream stream) throws IOException
writeEOF in class AbstractEntityFile<DataBlock>IOExceptionprotected void write(DataOutputStream stream, DataBlock entity) throws IOException
write in class AbstractEntityFile<DataBlock>IOExceptionprotected DataBlock read(DataInputStream stream) throws IOException
read in class AbstractEntityFile<DataBlock>IOExceptionprotected void writeMetaData(DataOutputStream stream) throws IOException
writeMetaData in class AbstractEntityFile<DataBlock>IOExceptionprotected void writeHeader()
throws IOException
writeHeader in class AbstractEntityFile<DataBlock>IOExceptionprotected void readMetaData(DataInputStream stream) throws IOException
readMetaData in class AbstractEntityFile<DataBlock>IOExceptionpublic ReadWriteLock getLock()
getLock in interface EntityFile<DataBlock>getLock in class AbstractEntityFile<DataBlock>public int getBlockSize()
Copyright © 2016. All rights reserved.