Package io.trino.orc.stream
Class BooleanInputStream
- java.lang.Object
-
- io.trino.orc.stream.BooleanInputStream
-
- All Implemented Interfaces:
ValueInputStream<BooleanStreamCheckpoint>
public class BooleanInputStream extends Object implements ValueInputStream<BooleanStreamCheckpoint>
-
-
Constructor Summary
Constructors Constructor Description BooleanInputStream(OrcInputStream byteStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountBitsSet(int items)voidgetSetBits(byte[] vector, int batchSize)Sets the vector element to 1 if the bit is set.byte[]getSetBits(int batchSize)Gets a vector of bytes set to 1 if the bit is set.intgetUnsetBits(int batchSize, boolean[] vector)Sets the vector element to true if the bit is not set.booleannextBit()voidseekToCheckpoint(BooleanStreamCheckpoint checkpoint)voidskip(long items)
-
-
-
Constructor Detail
-
BooleanInputStream
public BooleanInputStream(OrcInputStream byteStream)
-
-
Method Detail
-
nextBit
public boolean nextBit() throws IOException- Throws:
IOException
-
seekToCheckpoint
public void seekToCheckpoint(BooleanStreamCheckpoint checkpoint) throws IOException
- Specified by:
seekToCheckpointin interfaceValueInputStream<BooleanStreamCheckpoint>- Throws:
IOException
-
skip
public void skip(long items) throws IOException- Specified by:
skipin interfaceValueInputStream<BooleanStreamCheckpoint>- Throws:
IOException
-
countBitsSet
public int countBitsSet(int items) throws IOException- Throws:
IOException
-
getSetBits
public byte[] getSetBits(int batchSize) throws IOExceptionGets a vector of bytes set to 1 if the bit is set.- Throws:
IOException
-
getSetBits
public void getSetBits(byte[] vector, int batchSize) throws IOExceptionSets the vector element to 1 if the bit is set.- Throws:
IOException
-
getUnsetBits
public int getUnsetBits(int batchSize, boolean[] vector) throws IOExceptionSets the vector element to true if the bit is not set.- Throws:
IOException
-
-