Package com.ibm.icu.impl.coll
Class CollationKeys.SortKeyByteSink
java.lang.Object
com.ibm.icu.impl.coll.CollationKeys.SortKeyByteSink
- Direct Known Subclasses:
RuleBasedCollator.CollationKeyByteSink
- Enclosing class:
- CollationKeys
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append
(byte[] bytes, int n) void
Append
(int b) protected abstract void
AppendBeyondCapacity
(byte[] bytes, int start, int n, int length) int
int
boolean
protected abstract boolean
Resize
(int appendCapacity, int length) void
setBufferAndAppended
(byte[] dest, int app) Needed in Java for when we write to the buffer directly.
-
Field Details
-
buffer_
protected byte[] buffer_ -
appended_
private int appended_
-
-
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)
-