Cleanup handling of BinaryResult
Simplify the logic to stack BinaryResult instances on top of each other when applying the base64 and/or gzip transforms before writing to the HttpServletResponse. Change-Id: I1a477d5b9888cac981021149905a9aaa8f2f89ad
This commit is contained in:
@@ -64,7 +64,8 @@ public class GetContent implements RestReadView<FileResource> {
|
||||
public void writeTo(OutputStream os) throws IOException {
|
||||
object.copyTo(os);
|
||||
}
|
||||
}.setContentLength(object.getSize()).base64();
|
||||
}.setContentLength(object.getSize())
|
||||
.base64();
|
||||
} finally {
|
||||
tw.release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user