Package org.apache.solr.common.util
Interface Utf8CharSequence
- 
- All Superinterfaces:
- CharSequence,- Cloneable,- Comparable<Utf8CharSequence>
 - All Known Implementing Classes:
- ByteArrayUtf8CharSequence
 
 public interface Utf8CharSequence extends CharSequence, Comparable<Utf8CharSequence>, Cloneable A byte[] backed String
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description bytebyteAt(int idx)Utf8CharSequenceclone()default intcompareTo(Utf8CharSequence o)intsize()The size of utf8 bytesintwrite(int start, byte[] buffer, int pos)Write the bytes into a buffer.default voidwrite(OutputStream os)Creates a byte[] and copy to it first before writing it out to the output- 
Methods inherited from interface java.lang.CharSequencecharAt, chars, codePoints, length, subSequence, toString
 
- 
 
- 
- 
- 
Method Detail- 
writeint write(int start, byte[] buffer, int pos)Write the bytes into a buffer. The objective is to avoid the local bytes being exposed to other classes if the implementation is expected to be immutable. It writes as many bytes as possible into the buffer and then return how many bytes were written. It's the responsibility of the caller to call this method repeatedly and ensure that everything is completely written- Parameters:
- start- position from which to start writing
- buffer- the buffer to which to write to
- pos- position to start writing
- Returns:
- no:of bytes written
 
 - 
sizeint size() The size of utf8 bytes- Returns:
- the size
 
 - 
byteAtbyte byteAt(int idx) 
 - 
compareTodefault int compareTo(Utf8CharSequence o) - Specified by:
- compareToin interface- Comparable<Utf8CharSequence>
 
 - 
writedefault void write(OutputStream os) throws IOException Creates a byte[] and copy to it first before writing it out to the output- Parameters:
- os- The sink
- Throws:
- IOException
 
 - 
cloneUtf8CharSequence clone() 
 
- 
 
-