public class FixedWidthBlockBuilder extends AbstractFixedWidthBlock implements BlockBuilder
fixedSize| Constructor and Description |
|---|
FixedWidthBlockBuilder(int fixedSize,
BlockBuilderStatus blockBuilderStatus) |
FixedWidthBlockBuilder(int fixedSize,
int positionCount) |
| Modifier and Type | Method and Description |
|---|---|
BlockBuilder |
appendNull()
Appends a null value to the block.
|
Block |
build()
Builds the block.
|
BlockBuilder |
closeEntry()
Write a byte to the current entry;
|
int |
getPositionCount()
Returns the number of positions in this block.
|
protected io.airlift.slice.Slice |
getRawSlice() |
Block |
getRegion(int positionOffset,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
int |
getSizeInBytes()
Returns the size of this block in memory.
|
boolean |
isEmpty()
Have any values been added to the block?
|
protected boolean |
isEntryNull(int position) |
boolean |
isFull()
Is this block full? If true no more values should be added to the block.
|
String |
toString() |
BlockBuilder |
writeByte(int value)
Write a byte to the current entry;
|
BlockBuilder |
writeBytes(io.airlift.slice.Slice source,
int sourceIndex,
int length)
Write a byte sequences to the current entry;
|
BlockBuilder |
writeDouble(double value)
Write a double to the current entry;
|
BlockBuilder |
writeFloat(float value)
Write a float to the current entry;
|
BlockBuilder |
writeInt(int value)
Write a int to the current entry;
|
BlockBuilder |
writeLong(long value)
Write a long to the current entry;
|
BlockBuilder |
writeShort(int value)
Write a short to the current entry;
|
assureLoaded, bytesCompare, bytesEqual, checkReadablePosition, compareTo, equals, getByte, getDouble, getEncoding, getFixedSize, getFloat, getInt, getLength, getLong, getShort, getSingleValueBlock, getSlice, hash, isNull, writeBytesToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitassureLoaded, bytesCompare, bytesEqual, compareTo, equals, getByte, getDouble, getEncoding, getFloat, getInt, getLength, getLong, getShort, getSingleValueBlock, getSlice, hash, isNull, writeBytesTopublic FixedWidthBlockBuilder(int fixedSize,
BlockBuilderStatus blockBuilderStatus)
public FixedWidthBlockBuilder(int fixedSize,
int positionCount)
protected io.airlift.slice.Slice getRawSlice()
getRawSlice in class AbstractFixedWidthBlockpublic int getPositionCount()
BlockgetPositionCount in interface Blockpublic boolean isEmpty()
BlockBuilderisEmpty in interface BlockBuilderpublic boolean isFull()
BlockBuilderisFull in interface BlockBuilderpublic int getSizeInBytes()
BlockgetSizeInBytes in interface Blockpublic BlockBuilder writeByte(int value)
BlockBuilderwriteByte in interface BlockBuilderpublic BlockBuilder writeShort(int value)
BlockBuilderwriteShort in interface BlockBuilderpublic BlockBuilder writeInt(int value)
BlockBuilderwriteInt in interface BlockBuilderpublic BlockBuilder writeLong(long value)
BlockBuilderwriteLong in interface BlockBuilderpublic BlockBuilder writeFloat(float value)
BlockBuilderwriteFloat in interface BlockBuilderpublic BlockBuilder writeDouble(double value)
BlockBuilderwriteDouble in interface BlockBuilderpublic BlockBuilder writeBytes(io.airlift.slice.Slice source, int sourceIndex, int length)
BlockBuilderwriteBytes in interface BlockBuilderpublic BlockBuilder closeEntry()
BlockBuildercloseEntry in interface BlockBuilderpublic BlockBuilder appendNull()
BlockBuilderappendNull in interface BlockBuilderprotected boolean isEntryNull(int position)
isEntryNull in class AbstractFixedWidthBlockpublic Block getRegion(int positionOffset, int length)
Blockpublic Block build()
BlockBuilderbuild in interface BlockBuilderCopyright © 2012-2014. All Rights Reserved.