boolean matchingService(PrintService service, PrintServiceAttributeSet serviceSet) {
   if (serviceSet != null) {
     Attribute[] attrs = serviceSet.toArray();
     Attribute serviceAttr;
     for (int i = 0; i < attrs.length; i++) {
       serviceAttr = service.getAttribute(attrs[i].getCategory());
       if (serviceAttr == null || !serviceAttr.equals(attrs[i])) {
         return false;
       }
     }
   }
   return true;
 }