try {
if (a == null || b == null) return true;
if (a.match(b)) return true;
if (a.equals(WILDCARD)) return true;
if (a.getPrimaryType().equals("*")) {
MimeType c = new MimeType(b.getPrimaryType(), a.getSubType());
return c.match(b);
}
if (b.getPrimaryType().equals("*")) {
MimeType c = new MimeType(a.getPrimaryType(), b.getSubType());
return c.match(a);
}
} catch (Exception e) {}
return false;
}