Example usage for org.apache.lucene.store DataOutput writeLong

List of usage examples for org.apache.lucene.store DataOutput writeLong

Introduction

In this page you can find the example usage for org.apache.lucene.store DataOutput writeLong.

Prototype

public void writeLong(long i) throws IOException 

Source Link

Document

Writes a long as eight bytes.

Usage

From source file:org.elasticsearch.common.util.BloomFilter.java

License:Apache License

public static void serilaize(BloomFilter filter, DataOutput out) throws IOException {
    out.writeInt(0); // version

    BitArray bits = filter.bits;// www.  jav a2  s  . com
    out.writeInt(bits.data.length);
    for (long l : bits.data) {
        out.writeLong(l);
    }

    out.writeInt(filter.numHashFunctions);

    out.writeInt(0); // hashType
}

From source file:org.elasticsearch.index.translog.Checkpoint.java

License:Apache License

private void write(DataOutput out) throws IOException {
    out.writeLong(offset);
    out.writeInt(numOps);/*from  w ww  . j  ava 2 s  .  c  o m*/
    out.writeLong(generation);
}