return BigDecimal.valueOf(((Long)row[columnIndex - 1]).longValue(),
return BigDecimal.valueOf(((Number)row[columnIndex - 1]).longValue(),
    public Object getObject(int columnIndex) throws  SQLException {        if (row == null) {            throw new SQLException("No row fetched");        }        setWasNullColumnIndex(columnIndex);        if (wasNull()) {            return null;        }                int sqltype = getXsqlvar(columnIndex).sqltype & ~1;        int sqlscale = getXsqlvar(columnIndex).sqlscale;                if ((sqltype == GDS.SQL_TEXT) || (sqltype == GDS.SQL_VARYING)) {            if (row[columnIndex - 1] instanceof String) {                return row[columnIndex - 1];            } else {                return new String((byte[])row[columnIndex - 1]);            }        } else if ((sqltype == GDS.SQL_INT64) || (sqlscale < 0)) {            return BigDecimal.valueOf(((Long)row[columnIndex - 1]).longValue(),                                                               sqlscale * (-1));        } else if (sqltype == GDS.SQL_BLOB) {            InputStream in = getBinaryStream(columnIndex);            ByteArrayOutputStream out = new ByteArrayOutputStream();            try {                byte[] buffer = new byte[512];                while (in.available() > 0) {                    int count = in.read(buffer);                    out.write(buffer, 0, count);                }            } catch (java.io.IOException ex) {                throw new SQLException("Blob I/O error");            }            return out.toByteArray();        } else {                return row[columnIndex - 1];        }    }