Package com.alibaba.fastjson2.util
Class IOUtils
java.lang.Object
com.alibaba.fastjson2.util.IOUtils
-
Field Summary
Fields -
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 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 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 intwriteLocalDate(byte[] bytes, int off, int year, int month, int dayOfMonth) static intwriteLocalDate(char[] chars, int off, int year, int month, int dayOfMonth) static intwriteLocalTime(byte[] bytes, int off, LocalTime time) static intwriteLocalTime(char[] bytes, int off, LocalTime time)
-
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 -
DIGITS_K
public static final int[] DIGITS_K
-
-
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
-
writeLocalTime
-
writeInt64
public static int writeInt64(byte[] buf, int pos, long value) -
writeInt64
public static int writeInt64(char[] buf, int pos, long value) -
writeInt32
public static int writeInt32(byte[] buf, int pos, int value) -
writeInt32
public static int writeInt32(char[] buf, int pos, int value)
-