Package herddb.utils

Class RawString

  • All Implemented Interfaces:
    Comparable<RawString>

    public class RawString
    extends Object
    implements Comparable<RawString>
    A container for strings. Data is decoded to a real java.lang.String only if needed
    Author:
    enrico.olivelli
    • Field Detail

    • Constructor Detail

      • RawString

        public RawString​(io.netty.util.Recycler.Handle<RawString> handle)
    • Method Detail

      • newPooledRawString

        public static RawString newPooledRawString​(byte[] data,
                                                   int offset,
                                                   int length,
                                                   String string)
      • newPooledRawString

        public static RawString newPooledRawString​(byte[] data,
                                                   int offset,
                                                   int length)
      • newUnpooledRawString

        public static RawString newUnpooledRawString​(byte[] data,
                                                     int offset,
                                                     int length)
      • newUnpooledRawString

        public static RawString newUnpooledRawString​(byte[] data,
                                                     int offset,
                                                     int length,
                                                     String string)
      • recycle

        public void recycle()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • compareToString

        public int compareToString​(String o)
      • compareRaw

        public static int compareRaw​(byte[] left,
                                     int offset,
                                     int leftlen,
                                     byte[] right,
                                     int offsetright,
                                     int lenright)
      • compareRaw

        public static int compareRaw​(byte[] left,
                                     int offset,
                                     int leftlen,
                                     RawString other)
      • compareRaw

        public static int compareRaw​(byte[] left,
                                     int offset,
                                     int leftlen,
                                     String other)
      • getData

        public byte[] getData()
      • getOffset

        public int getOffset()
      • getLength

        public int getLength()
      • toByteArray

        public byte[] toByteArray()