List of usage examples for org.apache.lucene.store ByteArrayDataOutput writeByte
@Override
public void writeByte(byte b)
From source file:org.codelibs.elasticsearch.common.util.ByteUtils.java
License:Apache License
/** Same as DataOutput#writeVLong but accepts negative values (written on 9 bytes). */ public static void writeVLong(ByteArrayDataOutput out, long i) { for (int k = 0; k < 8 && (i & ~0x7FL) != 0L; ++k) { out.writeByte((byte) ((i & 0x7FL) | 0x80L)); i >>>= 7;/*from w w w . ja v a 2 s .c om*/ } out.writeByte((byte) i); }