com.alibaba.fastjson.util

Class IOUtils

    • Field Detail

      • DEFAULT_PROPERTIES

        public static final Properties DEFAULT_PROPERTIES
      • UTF8

        public static final Charset UTF8
      • DIGITS

        public static final char[] DIGITS
      • firstIdentifierFlags

        public static final boolean[] firstIdentifierFlags
      • identifierFlags

        public static final boolean[] identifierFlags
      • specicalFlags_doubleQuotes

        public static final byte[] specicalFlags_doubleQuotes
      • specicalFlags_singleQuotes

        public static final byte[] specicalFlags_singleQuotes
      • specicalFlags_doubleQuotesFlags

        public static final boolean[] specicalFlags_doubleQuotesFlags
      • specicalFlags_singleQuotesFlags

        public static final boolean[] specicalFlags_singleQuotesFlags
      • replaceChars

        public static final char[] replaceChars
      • ASCII_CHARS

        public static final char[] ASCII_CHARS
      • CA

        public static final char[] CA
      • IA

        public static final int[] IA
    • Constructor Detail

      • IOUtils

        public IOUtils()
    • Method Detail

      • getStringProperty

        public static String getStringProperty(String name)
      • loadPropertiesFromFile

        public static void loadPropertiesFromFile()
      • close

        public static void close(Closeable x)
      • stringSize

        public static int stringSize(long x)
      • getChars

        public static void getChars(long i,
                                    int index,
                                    char[] buf)
      • getChars

        public static void getChars(int i,
                                    int index,
                                    char[] buf)
        Places characters representing the integer i into the character array buf. The characters are placed into the buffer backwards starting with the least significant digit at the specified index (exclusive), and working backwards from there. Will fail if i == Integer.MIN_VALUE
      • getChars

        public static void getChars(byte b,
                                    int index,
                                    char[] buf)
      • stringSize

        public static int stringSize(int x)
      • firstIdentifier

        public static boolean firstIdentifier(char ch)
      • isIdent

        public static boolean isIdent(char ch)
      • decodeBase64

        public static byte[] decodeBase64(char[] chars,
                                          int offset,
                                          int charsLen)
        Decodes a BASE64 encoded char array that is known to be resonably well formatted. The method is about twice as fast as #decode(char[]). The preconditions are:
        + The array must have a line length of 76 chars OR no line separators at all (one line).
        + Line separator must be "\r\n", as specified in RFC 2045 + The array must not contain illegal characters within the encoded string
        + The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
        Parameters:
        chars - The source array. Length 0 will return an empty array. null will throw an exception.
        Returns:
        The decoded array of bytes. May be of length 0.
      • decodeBase64

        public static byte[] decodeBase64(String chars,
                                          int offset,
                                          int charsLen)
      • decodeBase64

        public static byte[] decodeBase64(String s)
        Decodes a BASE64 encoded string that is known to be resonably well formatted. The method is about twice as fast as decode(String). The preconditions are:
        + The array must have a line length of 76 chars OR no line separators at all (one line).
        + Line separator must be "\r\n", as specified in RFC 2045 + The array must not contain illegal characters within the encoded string
        + The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
        Parameters:
        s - The source string. Length 0 will return an empty array. null will throw an exception.
        Returns:
        The decoded array of bytes. May be of length 0.
      • encodeUTF8

        public static int encodeUTF8(char[] chars,
                                     int offset,
                                     int len,
                                     byte[] bytes)
      • decodeUTF8

        public static int decodeUTF8(byte[] sa,
                                     int sp,
                                     int len,
                                     char[] da)
        Deprecated. 
      • readAll

        public static String readAll(Reader reader)
        Deprecated. 
      • isValidJsonpQueryParam

        public static boolean isValidJsonpQueryParam(String value)

Copyright © 2012–2021 Alibaba Group. All rights reserved.