Class FastStringEncoder


  • public class FastStringEncoder
    extends java.lang.Object
    Fast string utf encoder.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.ThreadLocal<byte[]> bufLocal  
      private static int STEP  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void close​(byte[] buf)  
      static byte[] encodeUTF8​(java.lang.String s)  
      private static byte[] expandCapacity​(byte[] buf, int minNewCapacity)  
      private static byte[] getBuf​(int length)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bufLocal

        private static java.lang.ThreadLocal<byte[]> bufLocal
    • Constructor Detail

      • FastStringEncoder

        public FastStringEncoder()
    • Method Detail

      • getBuf

        private static byte[] getBuf​(int length)
      • close

        private static void close​(byte[] buf)
      • expandCapacity

        private static byte[] expandCapacity​(byte[] buf,
                                             int minNewCapacity)
      • encodeUTF8

        public static byte[] encodeUTF8​(java.lang.String s)