public void formatAndOutputEntity(EntityReference ref, String format, List<EntityData> entities, OutputStream outputStream, Map<String, Object> params) {
if (ref == null || format == null || outputStream == null) {
throw new IllegalArgumentException("ref, format, and output cannot be null");
}
String prefix = ref.getPrefix();
Outputable outputable = (Outputable) entityProviderManager.getProviderByPrefixAndCapability(prefix, Outputable.class);
if (outputable != null) {
String[] outputFormats = outputable.getHandledOutputFormats();
// check if the output formats are allowed
if (outputFormats == null || ReflectUtils.contains(outputFormats, format) ) {
boolean handled = false;
// if the user wants to serialize their objects specially then allow them to translate them