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 Object
  • 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 byte
      n - 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 byte
      start - the start index within the array to be appended
      n - the length of bytes to be appended
      length - 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)