Package com.alibaba.fastjson2.util
Class IOUtils
java.lang.Object
com.alibaba.fastjson2.util.IOUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final longstatic final int[]static final long[]static final longstatic final intstatic final longstatic final short[]static final int[]static final intstatic final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic intdecodeUTF8(byte[] src, int off, int len, byte[] dst) static intdecodeUTF8(byte[] src, int off, int len, char[] dst) static intencodeUTF8(byte[] src, int offset, int len, byte[] dst, int dp) static intencodeUTF8(char[] src, int offset, int len, byte[] dst, int dp) static voidgetChars(int i, int index, byte[] buf) static voidgetChars(int i, int index, char[] buf) static voidgetChars(long i, int index, byte[] buf) static voidgetChars(long i, int index, char[] buf) static booleanisNumber(byte[] chars, int off, int len) static booleanisNumber(char[] chars, int off, int len) static booleanstatic longstatic longlines(InputStream in) static voidputInt(byte[] buf, int pos, int v) static voidputInt(char[] buf, int pos, int v) static voidputLong(char[] buf, int pos, long v) static voidputShort(byte[] buf, int pos, short v) static intstringSize(int x) static intstringSize(long x) static intwriteDecimal(byte[] buf, int off, long unscaledVal, int scale) static intwriteDecimal(char[] buf, int off, long unscaledVal, int scale) static intwriteInt16(byte[] buf, int pos, short value) static intwriteInt16(char[] buf, int pos, short value) static intwriteInt32(byte[] buf, int pos, int value) static intwriteInt32(char[] buf, int pos, int value) static intwriteInt64(byte[] buf, int pos, long value) static intwriteInt64(char[] buf, int pos, long value) static intwriteInt8(byte[] buf, int pos, byte value) static intwriteInt8(char[] buf, int pos, byte value) static intwriteLocalDate(byte[] bytes, int off, int year, int month, int dayOfMonth) static intwriteLocalDate(char[] chars, int off, int year, int month, int dayOfMonth) static voidwriteLocalTime(byte[] bytes, int off, int hour, int minute, int second) static intwriteLocalTime(byte[] bytes, int off, LocalTime time) static voidwriteLocalTime(char[] chars, int off, int hour, int minute, int second) static intwriteLocalTime(char[] chars, int off, LocalTime time) static intwriteNano(byte[] bytes, int off, int nano) static intwriteNano(char[] chars, int off, int nano)
-
Field Details
-
NULL_32
public static final int NULL_32 -
NULL_64
public static final long NULL_64 -
TRUE
public static final int TRUE -
TRUE_64
public static final long TRUE_64 -
ALSE
public static final int ALSE -
ALSE_64
public static final long ALSE_64 -
DOT_X0
public static final long DOT_X0 -
DIGITS_K_32
public static final int[] DIGITS_K_32 -
DIGITS_K_64
public static final long[] DIGITS_K_64 -
PACKED_DIGITS
public static final short[] PACKED_DIGITS -
PACKED_DIGITS_UTF16
public static final int[] PACKED_DIGITS_UTF16
-
-
Constructor Details
-
IOUtils
public IOUtils()
-
-
Method Details
-
stringSize
public static int stringSize(int x) -
stringSize
public static int stringSize(long x) -
getChars
public static void getChars(int i, int index, byte[] buf) -
getChars
public static void getChars(int i, int index, char[] buf) -
getChars
public static void getChars(long i, int index, byte[] buf) -
getChars
public static void getChars(long i, int index, char[] buf) -
writeDecimal
public static int writeDecimal(byte[] buf, int off, long unscaledVal, int scale) -
writeDecimal
public static int writeDecimal(char[] buf, int off, long unscaledVal, int scale) -
encodeUTF8
public static int encodeUTF8(byte[] src, int offset, int len, byte[] dst, int dp) -
encodeUTF8
public static int encodeUTF8(char[] src, int offset, int len, byte[] dst, int dp) -
isNumber
-
isNumber
public static boolean isNumber(char[] chars, int off, int len) -
isNumber
public static boolean isNumber(byte[] chars, int off, int len) -
close
-
decodeUTF8
public static int decodeUTF8(byte[] src, int off, int len, byte[] dst) -
decodeUTF8
public static int decodeUTF8(byte[] src, int off, int len, char[] dst) -
lines
- Throws:
Exception
-
lines
- Throws:
Exception
-
writeLocalDate
public static int writeLocalDate(byte[] bytes, int off, int year, int month, int dayOfMonth) -
writeLocalDate
public static int writeLocalDate(char[] chars, int off, int year, int month, int dayOfMonth) -
writeLocalTime
public static void writeLocalTime(byte[] bytes, int off, int hour, int minute, int second) -
writeLocalTime
-
writeNano
public static int writeNano(byte[] bytes, int off, int nano) -
writeNano
public static int writeNano(char[] chars, int off, int nano) -
writeLocalTime
public static void writeLocalTime(char[] chars, int off, int hour, int minute, int second) -
writeLocalTime
-
writeInt64
public static int writeInt64(byte[] buf, int pos, long value) -
writeInt64
public static int writeInt64(char[] buf, int pos, long value) -
writeInt8
public static int writeInt8(byte[] buf, int pos, byte value) -
writeInt8
public static int writeInt8(char[] buf, int pos, byte value) -
writeInt16
public static int writeInt16(byte[] buf, int pos, short value) -
writeInt16
public static int writeInt16(char[] buf, int pos, short value) -
writeInt32
public static int writeInt32(byte[] buf, int pos, int value) -
writeInt32
public static int writeInt32(char[] buf, int pos, int value) -
putShort
public static void putShort(byte[] buf, int pos, short v) -
putInt
public static void putInt(byte[] buf, int pos, int v) -
putInt
public static void putInt(char[] buf, int pos, int v) -
putLong
public static void putLong(char[] buf, int pos, long v)
-