Example usage for org.apache.lucene.util BytesRefBuilder copyChars

List of usage examples for org.apache.lucene.util BytesRefBuilder copyChars

Introduction

In this page you can find the example usage for org.apache.lucene.util BytesRefBuilder copyChars.

Prototype

public void copyChars(char[] text, int off, int len) 

Source Link

Document

Replace the content of this buffer with UTF-8 encoded bytes that would represent the provided text.

Usage

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

License:Apache License

public static void write(DataOutput out, String s, BytesRefBuilder scratch) throws IOException {
    scratch.copyChars(s, 0, s.length());
    write(out, scratch.get());//from  www. j  a  v  a 2 s  .c o m
}