Example usage for org.apache.lucene.store ByteArrayDataInput getPosition

List of usage examples for org.apache.lucene.store ByteArrayDataInput getPosition

Introduction

In this page you can find the example usage for org.apache.lucene.store ByteArrayDataInput getPosition.

Prototype

public int getPosition() 

Source Link

Usage

From source file:com.rocana.lucene.codec.v1.RocanaSegmentTermsEnumFrame.java

License:Apache License

public void setFloorData(ByteArrayDataInput in, BytesRef source) {
    final int numBytes = source.length - (in.getPosition() - source.offset);
    if (numBytes > floorData.length) {
        floorData = new byte[ArrayUtil.oversize(numBytes, 1)];
    }//from  ww  w.j a va  2s .  c om
    System.arraycopy(source.bytes, source.offset + in.getPosition(), floorData, 0, numBytes);
    floorDataReader.reset(floorData, 0, numBytes);
    numFollowFloorBlocks = floorDataReader.readVInt();
    nextFloorLabel = floorDataReader.readByte() & 0xff;
    //if (DEBUG) {
    //System.out.println("    setFloorData fpOrig=" + fpOrig + " bytes=" + new BytesRef(source.bytes, source.offset + in.getPosition(), numBytes) + " numFollowFloorBlocks=" + numFollowFloorBlocks + " nextFloorLabel=" + toHex(nextFloorLabel));
    //}
}