public class StreamingDataBlockHeaderImpl extends Object implements DataBlockHeader
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_MAX_SIZE |
| Constructor and Description |
|---|
StreamingDataBlockHeaderImpl(long headerLength,
long blockLength,
long ledgerId,
long firstEntryId) |
| Modifier and Type | Method and Description |
|---|---|
static StreamingDataBlockHeaderImpl |
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.
|
long |
getLedgerId() |
static StreamingDataBlockHeaderImpl |
of(int blockLength,
long ledgerId,
long firstEntryId) |
InputStream |
toStream()
Get the content of the data block header as InputStream.
|
String |
toString() |
public static final int HEADER_MAX_SIZE
public StreamingDataBlockHeaderImpl(long headerLength,
long blockLength,
long ledgerId,
long firstEntryId)
public long getLedgerId()
public static StreamingDataBlockHeaderImpl of(int blockLength, long ledgerId, long firstEntryId)
public 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 static StreamingDataBlockHeaderImpl fromStream(InputStream stream) throws IOException
IOExceptionpublic InputStream toStream()
toStream in interface DataBlockHeaderCopyright © 2017–2021 Apache Software Foundation. All rights reserved.