This commit is contained in:
Arjen Poutsma 2009-08-04 12:41:36 +00:00
parent 68d07767ec
commit 2f6a25cfb7
1 changed files with 4 additions and 0 deletions

View File

@ -187,6 +187,10 @@ public class BufferedImageHttpMessageConverter extends AbstractHttpMessageConver
imageWriter.setOutput(imageOutputStream);
imageWriter.write(null, new IIOImage(image, null, null), iwp);
}
else {
throw new HttpMessageNotWritableException(
"Could not find javax.imageio.ImageWriter for Content-Type [" + contentType + "]");
}
}
finally {
if (imageWriter != null) {