code: public boolean tableExists (Connection conn, String name) throws SQLException
      {
          ResultSet rs = conn.getMetaData().getTables(null, null, name, null);
          while (rs.next()) {
              String tname = rs.getString("TABLE_NAME");
              if (name.equals(tname)) {
                  return true;
              }
          }
          return false;
      }
docs: from DatabaseLiaison