Package 

Class Utf8


  • 
    public final class Utf8
    
                        

    Okio assumes most applications use UTF-8 exclusively, and offers optimized implementations of common operations on UTF-8 strings.

    • Method Summary

      Modifier and Type Method Description
      static long size(String string) Returns the number of bytes used to encode {@code string} as UTF-8 when using or writeUtf8.
      static long size(String string, int beginIndex, int endIndex) Returns the number of bytes used to encode the slice of {@code string} as UTF-8 when using writeUtf8.
      • Methods inherited from class java.lang.Object

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

      • size

         static long size(String string)

        Returns the number of bytes used to encode {@code string} as UTF-8 when using or writeUtf8.

      • size

         static long size(String string, int beginIndex, int endIndex)

        Returns the number of bytes used to encode the slice of {@code string} as UTF-8 when using writeUtf8.