Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.wadpam.open.jsonp;
 
 
    private static final Logger         LOG = LoggerFactory.getLogger(GenericResponseWrapper.class);
    private final ByteArrayOutputStream output;
    private int                         contentLength;
    private int                         httpStatus = 200;
    private String                      redirectUrl;
    public GenericResponseWrapper(HttpServletResponse response) {
        super(response);
         = new ByteArrayOutputStream();
    }
    @Override
    public void sendError(int scthrows IOException {
         = sc;
        super.sendError(sc);
    }
    @Override
    public void sendError(int scString msgthrows IOException {
         = sc;
        super.sendError(scmsg);
    }
    @Override
    public void setStatus(int sc) {
         = sc;
        super.setStatus(sc);
    }
    @Override
    public void sendRedirect(String locationthrows IOException {
         = 302;
         = location;
        super.sendRedirect(location);
    }
    public int getStatus() {
        return ;
    }
    public byte[] getData() {
        return .toByteArray();
    }
        return new FilterServletOutputStream();
    }
    public PrintWriter getWriter() {
        return new PrintWriter(getOutputStream(), true);
    }
    public void setContentLength(int length) {
        this. = length;
        super.setContentLength(length);
    }
    public int getContentLength() {
        return ;
    }
    public String getRedirectUrl() {
        return ;
    }
New to GrepCode? Check out our FAQ X