public int compare(ProviderInfo<MessageBodyReader> p1,
ProviderInfo<MessageBodyReader> p2) {
MessageBodyReader e1 = p1.getProvider();
MessageBodyReader e2 = p2.getProvider();
ConsumeMime c = e1.getClass().getAnnotation(ConsumeMime.class);
String[] mimeType1 = {"*/*"};
if (c != null) {
mimeType1 = c.value();
}
ConsumeMime c2 = e2.getClass().getAnnotation(ConsumeMime.class);
String[] mimeType2 = {"*/*"};
if (c2 != null) {
mimeType2 = c2.value();
}
return compareString(mimeType1[0], mimeType2[0]);
}