if (serializer instanceof ServletSerializer)
serializers.put(contentType, (ServletSerializer)serializer);
else if (serializer instanceof TextSerializer)
serializers.put(contentType, new TextServletSerializer((TextSerializer)serializer));
else if (serializer instanceof StreamSerializer)
serializers.put(contentType, new StreamServletSerializer((StreamSerializer)serializer));
}
}