Class IOUtils


  • public class IOUtils
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IOUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void close​(Closeable x)  
      static int decodeUTF8​(byte[] src, int off, int len, byte[] dst)  
      static int decodeUTF8​(byte[] src, int off, int len, char[] dst)  
      static int encodeUTF8​(byte[] src, int offset, int len, byte[] dst, int dp)  
      static int encodeUTF8​(char[] src, int offset, int len, byte[] dst, int dp)  
      static void getChars​(int i, int index, byte[] buf)  
      static void getChars​(int i, int index, char[] buf)  
      static void getChars​(long i, int index, byte[] buf)  
      static void getChars​(long i, int index, char[] buf)  
      static boolean isNumber​(byte[] chars, int off, int len)  
      static boolean isNumber​(char[] chars, int off, int len)  
      static boolean isNumber​(String str)  
      static long lines​(File file)  
      static long lines​(InputStream in)  
      static void putInt​(byte[] buf, int pos, int v)  
      static void putInt​(char[] buf, int pos, int v)  
      static void putLong​(char[] buf, int pos, long v)  
      static void putShort​(byte[] buf, int pos, short v)  
      static int stringSize​(int x)  
      static int stringSize​(long x)  
      static int writeDecimal​(byte[] buf, int off, long unscaledVal, int scale)  
      static int writeDecimal​(char[] buf, int off, long unscaledVal, int scale)  
      static int writeInt16​(byte[] buf, int pos, short value)  
      static int writeInt16​(char[] buf, int pos, short value)  
      static int writeInt32​(byte[] buf, int pos, int value)  
      static int writeInt32​(char[] buf, int pos, int value)  
      static int writeInt64​(byte[] buf, int pos, long value)  
      static int writeInt64​(char[] buf, int pos, long value)  
      static int writeInt8​(byte[] buf, int pos, byte value)  
      static int writeInt8​(char[] buf, int pos, byte value)  
      static int writeLocalDate​(byte[] bytes, int off, int year, int month, int dayOfMonth)  
      static int writeLocalDate​(char[] chars, int off, int year, int month, int dayOfMonth)  
      static void writeLocalTime​(byte[] bytes, int off, int hour, int minute, int second)  
      static int writeLocalTime​(byte[] bytes, int off, LocalTime time)  
      static void writeLocalTime​(char[] chars, int off, int hour, int minute, int second)  
      static int writeLocalTime​(char[] chars, int off, LocalTime time)  
      static int writeNano​(byte[] bytes, int off, int nano)  
      static int writeNano​(char[] chars, int off, int nano)  
    • Field Detail

      • 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 Detail

      • IOUtils

        public IOUtils()
    • Method Detail

      • 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

        public static boolean isNumber​(String str)
      • isNumber

        public static boolean isNumber​(char[] chars,
                                       int off,
                                       int len)
      • isNumber

        public static boolean isNumber​(byte[] chars,
                                       int off,
                                       int len)
      • close

        public static void close​(Closeable x)
      • 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)
      • 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

        public static int writeLocalTime​(byte[] bytes,
                                         int off,
                                         LocalTime time)
      • 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

        public static int writeLocalTime​(char[] chars,
                                         int off,
                                         LocalTime time)
      • 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)