Package com.yahoo.text
Class Utf8PartialArray
- java.lang.Object
-
- com.yahoo.text.AbstractUtf8Array
-
- com.yahoo.text.Utf8Array
-
- com.yahoo.text.Utf8PartialArray
-
- All Implemented Interfaces:
Comparable<AbstractUtf8Array>
public class Utf8PartialArray extends Utf8Array
This wraps a window in a backing byte array. Without doing any copying.- Author:
- baldersheim
-
-
Constructor Summary
Constructors Constructor Description Utf8PartialArray(byte[] utf8data, int offset, int bytes)
Takes ownership of the given byte array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getByteLength()
Returns the length in bytes of the utf8 sequence.protected int
getByteOffset()
Returns the offset in the backing array where the utf8 sequence starts.-
Methods inherited from class com.yahoo.text.AbstractUtf8Array
ascii7BitLowerCase, compareTo, equals, getByte, hashCode, isEmpty, toString, wrap, writeTo
-
-
-
-
Constructor Detail
-
Utf8PartialArray
public Utf8PartialArray(byte[] utf8data, int offset, int bytes)
Takes ownership of the given byte array. And keeps note of where the interesting utf8 sequence start and its length.- Parameters:
utf8data
- The backing byte array.offset
- The start of the utf8 sequence.bytes
- The length of the utf8 sequence.
-
-
Method Detail
-
getByteLength
public int getByteLength()
Description copied from class:AbstractUtf8Array
Returns the length in bytes of the utf8 sequence.- Overrides:
getByteLength
in classUtf8Array
-
getByteOffset
protected int getByteOffset()
Description copied from class:AbstractUtf8Array
Returns the offset in the backing array where the utf8 sequence starts.- Overrides:
getByteOffset
in classUtf8Array
-
-