Class Utf8

java.lang.Object
one.nio.util.Utf8

public final class Utf8 extends Object
  • Field Details

    • compactStringConstructor

      private static final MethodHandle compactStringConstructor
  • Constructor Details

    • Utf8

      public Utf8()
  • Method Details

    • getCompactStringConstructor

      private static MethodHandle getCompactStringConstructor()
    • length

      public static int length(String s)
    • length

      public static int length(char[] c, int length)
    • write

      public static int write(String s, byte[] buf, int start)
    • write

      public static int write(String s, int stringStart, int maxChars, byte[] buf, int bufferStart)
    • write

      public static int write(String s, Object obj, long start)
    • write

      public static int write(String s, int inStart, int inCount, Object obj, long outStart)
    • write

      public static int write(char[] c, int length, byte[] buf, int start)
    • write

      public static int write(char[] c, int length, Object obj, long start)
    • read

      public static String read(byte[] buf, int start, int length)
    • read

      public static String read(Object obj, long start, int length)
    • isAsciiString

      private static boolean isAsciiString(Object obj, long start, int length)
    • toAsciiString

      private static String toAsciiString(Object obj, long start, int length)
    • toBytes

      public static byte[] toBytes(String s)
    • toString

      public static String toString(byte[] buf)
    • indexOf

      public static int indexOf(byte c, byte[] haystack)
    • indexOf

      public static int indexOf(byte c, byte[] haystack, int offset, int length)
    • indexOf

      public static int indexOf(byte[] needle, byte[] haystack)
    • indexOf

      public static int indexOf(byte[] needle, byte[] haystack, int offset, int length)
    • startsWith

      public static boolean startsWith(byte[] fragment, byte[] buf)
    • startsWith

      public static boolean startsWith(byte[] fragment, byte[] buf, int offset, int length)
    • startsWith

      public static boolean startsWith(byte[] fragment, byte[] buf, int offset)
    • parseLong

      public static long parseLong(byte[] buf)
    • parseLong

      public static long parseLong(byte[] buf, int offset, int length)