Class StringUtil


  • final class StringUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.nio.charset.Charset ISO8859_1  
      private static java.nio.charset.Charset USASCII  
      private static java.nio.charset.Charset UTF16  
      private static java.nio.charset.Charset UTF16BE  
      private static java.nio.charset.Charset UTF16LE  
      private static java.nio.charset.Charset UTF8  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private StringUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.nio.charset.Charset getCharset​(ToNativeContext toNativeContext)  
      (package private) static java.nio.charset.CharsetDecoder getDecoder​(java.nio.charset.Charset charset, java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetDecoder>> localDecoder)  
      (package private) static java.nio.charset.CharsetEncoder getEncoder​(java.nio.charset.Charset charset, java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetEncoder>> localEncoder)  
      private static java.nio.charset.Charset getEncodingCharset​(java.util.Collection<java.lang.annotation.Annotation> annotations)  
      private static java.nio.charset.CharsetDecoder initDecoder​(java.nio.charset.Charset charset, java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetDecoder>> localDecoder)  
      private static java.nio.charset.CharsetEncoder initEncoder​(java.nio.charset.Charset charset, java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetEncoder>> localEncoder)  
      (package private) static int stringLength​(java.nio.ByteBuffer in, int terminatorWidth)  
      (package private) static int terminatorWidth​(java.nio.charset.Charset charset)  
      (package private) static void throwException​(java.nio.charset.CoderResult result)  
      • Methods inherited from class java.lang.Object

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

      • UTF8

        private static final java.nio.charset.Charset UTF8
      • USASCII

        private static final java.nio.charset.Charset USASCII
      • ISO8859_1

        private static final java.nio.charset.Charset ISO8859_1
      • UTF16

        private static final java.nio.charset.Charset UTF16
      • UTF16LE

        private static final java.nio.charset.Charset UTF16LE
      • UTF16BE

        private static final java.nio.charset.Charset UTF16BE
    • Constructor Detail

      • StringUtil

        private StringUtil()
    • Method Detail

      • getEncoder

        static java.nio.charset.CharsetEncoder getEncoder​(java.nio.charset.Charset charset,
                                                          java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetEncoder>> localEncoder)
      • getDecoder

        static java.nio.charset.CharsetDecoder getDecoder​(java.nio.charset.Charset charset,
                                                          java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetDecoder>> localDecoder)
      • initEncoder

        private static java.nio.charset.CharsetEncoder initEncoder​(java.nio.charset.Charset charset,
                                                                   java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetEncoder>> localEncoder)
      • initDecoder

        private static java.nio.charset.CharsetDecoder initDecoder​(java.nio.charset.Charset charset,
                                                                   java.lang.ThreadLocal<java.lang.ref.Reference<java.nio.charset.CharsetDecoder>> localDecoder)
      • getCharset

        static java.nio.charset.Charset getCharset​(ToNativeContext toNativeContext)
      • getEncodingCharset

        private static java.nio.charset.Charset getEncodingCharset​(java.util.Collection<java.lang.annotation.Annotation> annotations)
      • throwException

        static void throwException​(java.nio.charset.CoderResult result)
      • terminatorWidth

        static int terminatorWidth​(java.nio.charset.Charset charset)
      • stringLength

        static int stringLength​(java.nio.ByteBuffer in,
                                int terminatorWidth)