Class CollationKeys.SortKeyByteSink
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.impl.coll.CollationKeys.SortKeyByteSink
- Enclosing class:
CollationKeys
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend(byte[] bytes, int n) voidAppend(int b) protected abstract voidAppendBeyondCapacity(byte[] bytes, int start, int n, int length) intintbooleanprotected abstract booleanResize(int appendCapacity, int length) voidsetBufferAndAppended(byte[] dest, int app) Needed in Java for when we write to the buffer directly.
-
Field Details
-
buffer_
protected byte[] buffer_
-
-
Constructor Details
-
SortKeyByteSink
public SortKeyByteSink(byte[] dest)
-
-
Method Details
-
setBufferAndAppended
public void setBufferAndAppended(byte[] dest, int app) Needed in Java for when we write to the buffer directly. In C++, the SortKeyByteSink is a subclass of ByteSink and lower-level code can write to that. TODO: Can we make Java SortKeyByteSink have-a ByteArrayWrapper and write through to it? Or maybe create interface ByteSink, have SortKeyByteSink implement it, and have BOCSU write to that?? -
Append
public void Append(byte[] bytes, int n) - Parameters:
bytes- the array of byten- the length of bytes to be appended
-
Append
public void Append(int b) -
NumberOfBytesAppended
public int NumberOfBytesAppended() -
GetRemainingCapacity
public int GetRemainingCapacity() -
Overflowed
public boolean Overflowed() -
AppendBeyondCapacity
protected abstract void AppendBeyondCapacity(byte[] bytes, int start, int n, int length) - Parameters:
bytes- the array of bytestart- the start index within the array to be appendedn- the length of bytes to be appendedlength- the length of buffer required to store the entire data (i.e. already appended bytes + bytes to be appended by this method)
-
Resize
protected abstract boolean Resize(int appendCapacity, int length)
-