MCPcopy Create free account
hub / github.com/apache/orc / skip

Method skip

java/core/src/java/org/apache/orc/impl/BitFieldReader.java:125–138  ·  view source on GitHub ↗
(long totalBits)

Source from the content-addressed store, hash-verified

123 }
124
125 public void skip(long totalBits) throws IOException {
126 final int availableBits = 8 - currentIdx;
127 if (totalBits <= availableBits) {
128 currentIdx += totalBits;
129 } else {
130 final long bitsToSkip = (totalBits - availableBits);
131 input.skip(bitsToSkip / 8);
132 // Edge case: when skipping the last bits of a bitField there is nothing more to read!
133 if (input.hasNext()) {
134 current = input.next();
135 currentIdx = (byte) (bitsToSkip % 8);
136 }
137 }
138 }
139
140 @Override
141 public String toString() {

Callers 3

testSkipsMethod · 0.95
testSeekSkipMethod · 0.95
nextVectorMethod · 0.95

Calls 3

skipMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65

Tested by 2

testSkipsMethod · 0.76
testSeekSkipMethod · 0.76