Package one.nio.util
Class Utf8
- java.lang.Object
-
- one.nio.util.Utf8
-
public final class Utf8 extends Object
-
-
Constructor Summary
Constructors Constructor Description Utf8()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intindexOf(byte[] needle, byte[] haystack)static intindexOf(byte[] needle, byte[] haystack, int offset, int length)static intindexOf(byte c, byte[] haystack)static intindexOf(byte c, byte[] haystack, int offset, int length)static intlength(char[] c, int length)static intlength(String s)static longparseLong(byte[] buf)static longparseLong(byte[] buf, int offset, int length)static Stringread(byte[] buf, int start, int length)static Stringread(Object obj, long start, int length)static booleanstartsWith(byte[] fragment, byte[] buf)static booleanstartsWith(byte[] fragment, byte[] buf, int offset)static booleanstartsWith(byte[] fragment, byte[] buf, int offset, int length)static byte[]toBytes(String s)static StringtoString(byte[] buf)static intwrite(char[] c, int length, byte[] buf, int start)static intwrite(char[] c, int length, Object obj, long start)static intwrite(String s, byte[] buf, int start)static intwrite(String s, int stringStart, int maxChars, byte[] buf, int bufferStart)static intwrite(String s, int inStart, int inCount, Object obj, long outStart)static intwrite(String s, Object obj, long start)
-
-
-
Method Detail
-
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(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)
-
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)
-
-