currVols.msgVolId = DbUtil.getUnsignedTinyIntAsShort(rs, 1); short s = DbUtil.getUnsignedTinyIntAsShort(rs, 2);
currVols.msgVolId = rs.getShort(1); short s = rs.getShort(2);
    public static CurrentVolumes getCurrentVolumes(Connection conn) throws ServiceException {        CurrentVolumes currVols = new CurrentVolumes();        PreparedStatement stmt = null;        ResultSet rs = null;        try {            stmt = conn.prepareStatement("SELECT message_volume_id, secondary_message_volume_id, index_volume_id FROM current_volumes");            rs = stmt.executeQuery();            if (rs.next()) {                currVols.msgVolId = DbUtil.getUnsignedTinyIntAsShort(rs, 1);                short s = DbUtil.getUnsignedTinyIntAsShort(rs, 2);                if (!rs.wasNull())                    currVols.secondaryMsgVolId = s;                currVols.indexVolId = DbUtil.getUnsignedTinyIntAsShort(rs, 3);            }        } catch (SQLException e) {            throw ServiceException.FAILURE("getting current volumes", e);        } finally {            DbPool.closeResults(rs);            DbPool.closeStatement(stmt);        }        if (currVols.msgVolId != Volume.ID_NONE && currVols.indexVolId != Volume.ID_NONE)            return currVols;        else            return null;    }