public class DataBlockHeaderImpl extends Object implements DataBlockHeader
| Constructor and Description |
|---|
DataBlockHeaderImpl(long headerLength,
long blockLength,
long firstEntryId) |
| Modifier and Type | Method and Description |
|---|---|
static DataBlockHeader |
fromStream(InputStream stream) |
long |
getBlockLength()
Get the length of the block in bytes, including the header.
|
static int |
getBlockMagicWord() |
static int |
getDataStartOffset() |
long |
getFirstEntryId()
Get the message entry Id for the first message that stored in this data block.
|
long |
getHeaderLength()
Get the size of this DataBlockHeader.
|
static DataBlockHeaderImpl |
of(int blockLength,
long firstEntryId) |
InputStream |
toStream()
Get the content of the data block header as InputStream.
|
String |
toString() |
public DataBlockHeaderImpl(long headerLength,
long blockLength,
long firstEntryId)
public static DataBlockHeaderImpl of(int blockLength, long firstEntryId)
public static DataBlockHeader fromStream(InputStream stream) throws IOException
IOExceptionpublic static int getBlockMagicWord()
public static int getDataStartOffset()
public long getBlockLength()
DataBlockHeadergetBlockLength in interface DataBlockHeaderpublic long getHeaderLength()
DataBlockHeadergetHeaderLength in interface DataBlockHeaderpublic long getFirstEntryId()
DataBlockHeadergetFirstEntryId in interface DataBlockHeaderpublic InputStream toStream()
toStream in interface DataBlockHeaderCopyright © 2017–2022 Apache Software Foundation. All rights reserved.