public static class IntBlockPool.SliceWriter
extends java.lang.Object
IntBlockPool.SliceWriter
that allows to write multiple integer slices into a given IntBlockPool
.IntBlockPool.SliceReader
Modifier and Type | Field and Description |
---|---|
private int |
offset |
private IntBlockPool |
pool |
Constructor and Description |
---|
SliceWriter(IntBlockPool pool) |
Modifier and Type | Method and Description |
---|---|
int |
getCurrentOffset()
Returns the offset of the currently written slice.
|
void |
reset(int sliceOffset) |
int |
startNewSlice()
starts a new slice and returns the start offset.
|
void |
writeInt(int value)
Writes the given value into the slice and resizes the slice if needed
|
private int offset
private final IntBlockPool pool
public SliceWriter(IntBlockPool pool)
public void reset(int sliceOffset)
public void writeInt(int value)
public int startNewSlice()
IntBlockPool.SliceReader
.public int getCurrentOffset()
IntBlockPool.SliceReader
once
this slice is fully written or to reset the this writer if another slice
needs to be written.