return rs.getObject( index );
value = rs.getObject( index ); return ( rs.wasNull()? null : value );
    public static Object getObject( ResultSet rs, int index, int sqlType )            throws SQLException    {        Object value;        long longVal;        int intVal;        boolean boolVal;        double doubleVal;        float floatVal;        short shortVal;        byte byteVal;        switch ( sqlType ) {        case Types.CHAR:        case Types.VARCHAR:        case Types.LONGVARCHAR:            return rs.getString(index);        case Types.DECIMAL:        case Types.NUMERIC:            return rs.getBigDecimal( index );        case Types.INTEGER:            intVal = rs.getInt( index );            return ( rs.wasNull() ? null : new Integer( intVal ) );        case Types.TIME:            return rs.getTime( index );        case Types.DATE:            return rs.getDate( index );        case Types.TIMESTAMP:            return rs.getTimestamp( index );         case Types.FLOAT:        case Types.DOUBLE:            doubleVal = rs.getDouble( index );            return ( rs.wasNull() ? null : new Double( doubleVal ) );        case Types.REAL:            floatVal = rs.getFloat( index );            return ( rs.wasNull() ? null : new Float( floatVal ) );        case Types.SMALLINT:            shortVal = rs.getShort( index );            return ( rs.wasNull() ? null : new Short( shortVal ) );        case Types.TINYINT:            byteVal = rs.getByte( index );            return ( rs.wasNull() ? null : new Byte( byteVal ) );        case Types.LONGVARBINARY:        case Types.VARBINARY:        case Types.BINARY:            return rs.getBytes(index);        case Types.BLOB:            try {                Blob blob = rs.getBlob( index );                InputStream blobIs = blob.getBinaryStream();                ByteArrayOutputStream bos = new ByteArrayOutputStream();                byte[] buffer = new byte[256];                int len = 0;                int b;                while ( (len = blobIs.read(buffer)) > 0 )                    bos.write( buffer, 0, len );                return bos.toByteArray();            } catch ( IOException e ) {                throw new SQLException("IOException thrown while reading BLOB into a byte array!");            }        case Types.CLOB:            try {                Clob blob = rs.getClob( index );                Reader blobIs = blob.getCharacterStream();                CharArrayWriter bos = new CharArrayWriter();                char[] buffer = new char[256];                int len = 0;                int b;                while ( (len = blobIs.read(buffer)) > 0 )                    bos.write( buffer, 0, len );                return bos.toString();            } catch ( IOException e ) {                throw new SQLException("IOException thrown while reading CLOB into a string!");            }        case Types.BIGINT:            longVal = rs.getLong( index );            return ( rs.wasNull() ? null : new Long( longVal ) );        case Types.BIT:            boolVal = rs.getBoolean( index );            return ( rs.wasNull() ? null : new Boolean( boolVal ) );        default:                           return rs.getObject( index );         }    }