Package com.ibm.icu.impl.coll
Class CollationKeys.SortKeyByteSink
- java.lang.Object
-
- com.ibm.icu.impl.coll.CollationKeys.SortKeyByteSink
-
- Enclosing class:
- CollationKeys
public abstract static class CollationKeys.SortKeyByteSink extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]buffer_
-
Constructor Summary
Constructors Constructor Description SortKeyByteSink(byte[] dest)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidAppend(byte[] bytes, int n)voidAppend(int b)protected abstract voidAppendBeyondCapacity(byte[] bytes, int start, int n, int length)intGetRemainingCapacity()intNumberOfBytesAppended()booleanOverflowed()protected abstract booleanResize(int appendCapacity, int length)voidsetBufferAndAppended(byte[] dest, int app)Needed in Java for when we write to the buffer directly.
-
-
-
Method Detail
-
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)
-
-