public ByteArrayDataOutput(byte[] bytes, int offset, int len) { reset(bytes, offset, len); }
public ByteArrayDataOutput() { reset(BytesRef.EMPTY_BYTES); }
public ByteArrayDataOutput(byte[] bytes) { reset(bytes); }
public void reset(byte[] bytes) { reset(bytes, 0, bytes.length); }
scratchOutput.reset(scratch.bytes());
public ByteArrayDataOutput(byte[] bytes, int offset, int len) { reset(bytes, offset, len); }
public ByteArrayDataOutput(byte[] bytes) { reset(bytes); }
public ByteArrayDataOutput(byte[] bytes) { reset(bytes); }
public ByteArrayDataOutput(byte[] bytes, int offset, int len) { reset(bytes, offset, len); }
public void reset(byte[] bytes) { reset(bytes, 0, bytes.length); }
public ByteArrayDataOutput(byte[] bytes) { reset(bytes); }
public ByteArrayDataOutput(byte[] bytes, int offset, int len) { reset(bytes, offset, len); }
public ByteArrayDataOutput() { reset(BytesRef.EMPTY_BYTES); }
public ByteArrayDataOutput() { reset(BytesRef.EMPTY_BYTES); }
public void reset(byte[] bytes) { reset(bytes, 0, bytes.length); }
private void encodeValues(int count) throws IOException { out.reset(buffer); long lastOrd = 0; for (int i = 0; i < count; i++) { long ord = ords.next().longValue(); out.writeVLong(ord - lastOrd); lastOrd = ord; } }
output.reset(buffer);
@Override protected void encode(ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, BytesRef payload, Set<BytesRef> contexts, long weight) throws IOException { if (spare.length + 4 >= buffer.length) { buffer = ArrayUtil.grow(buffer, spare.length + 4); } output.reset(buffer); output.writeBytes(spare.bytes, spare.offset, spare.length); output.writeInt(encodeWeight(weight)); writer.write(buffer, 0, output.getPosition()); }
protected void encode(ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight) throws IOException { if (spare.length + 8 >= buffer.length) { buffer = ArrayUtil.grow(buffer, spare.length + 8); } output.reset(buffer); output.writeBytes(spare.bytes, spare.offset, spare.length); output.writeLong(weight); writer.write(buffer, 0, output.getPosition()); }
@Override protected void encode(ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight) throws IOException { if (spare.length + 5 >= buffer.length) { buffer = ArrayUtil.grow(buffer, spare.length + 5); } output.reset(buffer); output.writeBytes(spare.bytes, spare.offset, spare.length); output.writeByte((byte)0); // separator: not used, just for sort order output.writeInt(encodeWeight(weight)); writer.write(buffer, 0, output.getPosition()); }