Here you can find the source of toJavaType(int sqlType, String type)
public static Class<?> toJavaType(int sqlType, String type) throws SQLException
//package com.java2s; //License from project: LGPL import java.math.*; import java.sql.*; import java.sql.Array; import java.sql.Date; public class Main { public static Class<?> toJavaType(int sqlType, String type) throws SQLException { switch (sqlType) { case Types.ARRAY: return Array.class; case Types.BIGINT: return Long.class; case Types.BINARY: case Types.LONGVARBINARY: case Types.VARBINARY: case Types.BIT: return Byte[].class; case Types.BLOB: return Blob.class; case Types.BOOLEAN: return Boolean.class; case Types.CHAR: case Types.LONGNVARCHAR: case Types.LONGVARCHAR: case Types.NCHAR: case Types.NVARCHAR: case Types.VARCHAR: return String.class; case Types.CLOB: case Types.NCLOB: return Clob.class; case Types.DATE: return Date.class; case Types.DECIMAL: case Types.NUMERIC: case Types.FLOAT: return BigDecimal.class; case Types.DOUBLE: case Types.REAL: return Double.class; case Types.INTEGER: return Integer.class; case Types.NULL: return null; case Types.REF: return Ref.class; case Types.ROWID: return RowId.class; case Types.SMALLINT: return Short.class; case Types.SQLXML: return SQLXML.class; case Types.TIME: return Time.class; case Types.TIMESTAMP: return Timestamp.class; case Types.TINYINT: return Byte.class; case Types.JAVA_OBJECT: case Types.OTHER: case Types.STRUCT: default://from ww w. j av a 2 s . c om throw new SQLException("no conversion found for type '" + type + "'"); } } }