genericType, annotations, mediaType);
if (writer == null)
throw createWriterNotFound(genericType, mediaType);
final Map<String, Object> attributes = new HashMap<String, Object>();
MessageBodyWriterContextImpl messageBodyWriterContext = new MessageBodyWriterContextImpl(interceptors, writer, toOutput, type,
genericType, annotations, mediaType, requestHeaders, outputStream)
{
@Override
public Object getAttribute(String attribute)
{
return attributes.get(attribute);
}
@Override
public void setAttribute(String name, Object value)
{
attributes.put(name, value);
}
@Override
public void removeAttribute(String name)
{
attributes.remove(name);
}
};
messageBodyWriterContext
.proceed();
}