@GET
    public Response getContents() throws GuacamoleException {

        // Build base response exposing the raw contents of the underlying log
        ResponseBuilder response = Response.ok(log.getContent(),
                log.getType().getContentType());

        // Include size, if known
        long size = log.getSize();
        if (size >= 0)
            response.header("Content-Length", size);

        return response.build();

    }
Returns the raw contents of the underlying ActivityLog. If the size of
the ActivityLog is known, this size is included as the "Content-Length"
of the response.

@return
    A Response containing the raw contents of the underlying
    ActivityLog.

@throws GuacamoleException
    If an error prevents retrieving the content of the log or its size.
guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityLogResource.java