Searched refs:desiredType (Results 1 – 2 of 2) sorted by relevance
128 public static boolean compareMimeTypes(String concreteType, String desiredType) { in compareMimeTypes() argument129 final int typeLength = desiredType.length(); in compareMimeTypes()130 if (typeLength == 3 && desiredType.equals("*/*")) { in compareMimeTypes()134 final int slashpos = desiredType.indexOf('/'); in compareMimeTypes()136 if (typeLength == slashpos+2 && desiredType.charAt(slashpos+1) == '*') { in compareMimeTypes()137 if (desiredType.regionMatches(0, concreteType, 0, slashpos+1)) { in compareMimeTypes()140 } else if (desiredType.equals(concreteType)) { in compareMimeTypes()
177 public static boolean compareTypes(SliceItem item, String desiredType) { in compareTypes() argument178 final int typeLength = desiredType.length(); in compareTypes()179 if (typeLength == 3 && desiredType.equals("*/*")) { in compareTypes()182 if (item.getSubType() == null && desiredType.indexOf('/') < 0) { in compareTypes()183 return item.getFormat().equals(desiredType); in compareTypes()186 .matches(desiredType.replaceAll("\\*", ".*")); in compareTypes()