List of usage examples for org.apache.lucene.util CharsRef EMPTY_CHARS
null EMPTY_CHARS
To view the source code for org.apache.lucene.util CharsRef EMPTY_CHARS.
Click Source Link
From source file:elhuyar.bilakit.Dictionary.java
License:Apache License
static char[] decodeFlags(BytesRef b) { if (b.length == 0) { return CharsRef.EMPTY_CHARS; }//from w w w . j av a 2s . co m int len = b.length >>> 1; char flags[] = new char[len]; int upto = 0; int end = b.offset + b.length; for (int i = b.offset; i < end; i += 2) { flags[upto++] = (char) ((b.bytes[i] << 8) | (b.bytes[i + 1] & 0xff)); } return flags; }
From source file:stemmer.Dictionary.java
License:Apache License
static char[] decodeFlags(BytesRef b) { if (b.length == 0) { return CharsRef.EMPTY_CHARS; }// w ww. j a v a 2 s.c o m int len = b.length >>> 1; char flags[] = new char[len]; int upto = 0; int end = b.offset + b.length; for (int i = b.offset; i < end; i += 2) { flags[upto++] = (char) ((b.bytes[i] << 8) | (b.bytes[i + 1] & 0xff)); } return flags; }