Example usage for org.apache.lucene.store DataInput skipBytes

List of usage examples for org.apache.lucene.store DataInput skipBytes

Introduction

In this page you can find the example usage for org.apache.lucene.store DataInput skipBytes.

Prototype

public void skipBytes(final long numBytes) throws IOException 

Source Link

Document

Skip over numBytes bytes.

Usage

From source file:com.lucure.core.codec.CompressingStoredFieldsReader.java

License:Apache License

private static void skipField(DataInput in, int bits, FieldVisibility cv) throws IOException {
    switch (bits & TYPE_MASK) {
    case BYTE_ARR:
    case STRING:/*from w w  w.java2  s .  c  o m*/
        final int length = in.readVInt();
        in.skipBytes(length);
        break;
    case NUMERIC_INT:
    case NUMERIC_FLOAT:
        in.readInt();
        break;
    case NUMERIC_LONG:
    case NUMERIC_DOUBLE:
        in.readLong();
        break;
    default:
        throw new AssertionError("Unknown type flag: " + Integer.toHexString(bits));
    }
}