* PrettyXML writer, or any other writer that supports any writer that supports a specific form of "application/*".
* It's always best to be very specific in the Accept headers.
*/
public static NamedWriter getAcceptableNamedWriter(Abdera abdera, String accept_header) {
String[] sorted_accepts = orderByQ(accept_header);
WriterFactory factory = abdera.getWriterFactory();
if (factory == null)
return null;
for (String accept : sorted_accepts) {
NamedWriter writer = (NamedWriter)factory.getWriterByMediaType(accept);
if (writer != null)
return writer;
}
return null;
}