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
public abstract static class CollationKeys.SortKeyByteSink extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SortKeyByteSink(byte[] dest)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
Append(byte[] bytes, int n)
void
Append(int b)
protected abstract void
AppendBeyondCapacity(byte[] bytes, int start, int n, int length)
int
GetRemainingCapacity()
int
NumberOfBytesAppended()
boolean
Overflowed()
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.
-
-
-
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)
-
-