Package ef.impl.response

Examples of ef.impl.response.WritingResponse


    @Override
    public Response execute(final FileRequest request) {
        Volume volume = volumeManager.getRequiredVolume(request.target);
        final FileData data = volume.read(request.target);

        return new WritingResponse() {
            @Override
            public void write(HttpServletResponse resp) throws IOException{
                try {
                    if(request.download){
                        HeaderUtil.writeDisposition(resp, data.getEntry().getName());
View Full Code Here


        log.debug("writing response: {}", response);

        HeaderUtil.writeNoCache(resp);

        if(response instanceof WritingResponse){
            WritingResponse writingResponse = (WritingResponse) response;
            writingResponse.write(resp);
        }else{
            resp.setContentType("application/json");
            resp.setCharacterEncoding("UTF-8");
            mapper.writeValue(resp.getOutputStream(), response);
        }
View Full Code Here

TOP

Related Classes of ef.impl.response.WritingResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.