Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.agilecoders.wicket.logging;
 
 
An empty resource response that disables caching and uses a given status code or 200.

Author(s):
miha
public class EmptyResourceResponse extends AbstractResource.ResourceResponse {

    
Construct. Uses "200" as default http status code.
    public EmptyResourceResponse() {
        this(200);
    }

    
Construct.

Parameters:
statusCode the return http status code
    public EmptyResourceResponse(int statusCode) {
        super();
        disableCaching();
        setStatusCode(statusCode);
        setContentLength(0);
        setContentType("text/plain");
    }

    
creates a new empty write callback.

        return new AbstractResource.WriteCallback() {
            @Override
            public void writeData(IResource.Attributes attributesthrows IOException {
            }
        };
    }
New to GrepCode? Check out our FAQ X