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

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

Introduction

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

Prototype

public abstract void writeByte(byte b) throws IOException;

Source Link

Document

Writes a single byte.

Usage

From source file:com.browseengine.bobo.geosearch.impl.MappedFieldNameFilterConverter.java

License:Apache License

@Override
public void writeToOutput(DataOutput output) throws IOException {
    output.writeVInt(FIELD_FILTER_VERSION);

    if (bitmasks != null) {
        output.writeVInt(bitmasks.size());
        for (Map.Entry<String, Byte> filterEntry : bitmasks.entrySet()) {
            output.writeString(filterEntry.getKey());
            output.writeByte(filterEntry.getValue());
        }/*from  w w  w  . j a  va 2s  .  co  m*/
    } else {
        output.writeVInt(0);
    }
}

From source file:org.apache.solr.codecs.onsql.ONSQLUtil.java

License:Apache License

public static void write(DataOutput out, BytesRef b) throws IOException {
    for (int i = 0; i < b.length; i++) {
        final byte bx = b.bytes[b.offset + i];
        if (bx == NEWLINE || bx == ESCAPE) {
            out.writeByte(ESCAPE);
        }/*from  w  ww .j a  va 2  s  . c om*/
        out.writeByte(bx);
    }
}

From source file:org.apache.solr.codecs.onsql.ONSQLUtil.java

License:Apache License

public static void writeNewline(DataOutput out) throws IOException {
    out.writeByte(NEWLINE);
}