public static class IntBlockPool.SliceWriter extends Object
IntBlockPool.SliceWriter
that allows to write multiple integer slices into a given IntBlockPool
.IntBlockPool.SliceReader
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
|
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.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.