//
if (request.getPhase() == Phase.VIEW) {
if (result instanceof Response.Content) {
Response.Status status = (Response.Status)result;
final Streamable wrapped = status.streamable();
Streamable wrapper = new Streamable() {
public void send(final Stream stream) throws IllegalStateException {
Stream our = new Stream() {
boolean done = false;
public void provide(Chunk chunk) {
if (chunk instanceof Chunk.Data && !done) {