Class Utils


  • public final class Utils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static byte[][] tenRadixArr  
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Field Detail

      • tenRadixArr

        private static byte[][] tenRadixArr
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • quoteSqlIdentifier

        static java.lang.String quoteSqlIdentifier​(java.lang.String identifier)
        Quote an SQL identifier by enclosing it in double-quote characters and escaping any double-quote characters with an extra double-quote character.
        Parameters:
        identifier - the identifier to quote
        Returns:
        the quoted identifier
      • getStringFromBytes

        static java.lang.String getStringFromBytes​(byte[] bytes)
      • getStringFromInts

        static java.lang.String getStringFromInts​(int[] ints)
      • computeBigDecimalPrecision

        public static int computeBigDecimalPrecision​(java.math.BigDecimal decimal)
      • byteArrayCmp

        private static int byteArrayCmp​(byte[] arg1,
                                        byte[] arg2)
      • getSqlcodeFromSqlca

        public static int getSqlcodeFromSqlca​(Sqlca sqlca)
      • squashLongs

        public static int[] squashLongs​(long[] longs)
        Squash an array of longs into an array of ints
      • accumulateSQLException

        public static java.sql.SQLException accumulateSQLException​(java.sql.SQLException latestException,
                                                                   java.sql.SQLException accumulatedExceptions)
      • isSqlTypeNullable

        public static boolean isSqlTypeNullable​(int sqlType)
      • getNonNullableSqlType

        static int getNonNullableSqlType​(int sqlType)