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:
Shawn Pearce
2013-05-20 08:15:49 -07:00
parent b6df03968d
commit 2012c46e26
3 changed files with 81 additions and 71 deletions

View File

@@ -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();
}