com.cybermkd.common.http.result.ImageResult Maven / Gradle / Ivy
package com.cybermkd.common.http.result;
import com.cybermkd.common.http.ContentType;
import java.awt.image.RenderedImage;
import java.util.Map;
/**
* Created by ice on 14-12-19.
*/
public class ImageResult extends WebResult {
private final String type;
public ImageResult(HttpStatus status, String type) {
super(status);
this.type = type;
}
public ImageResult(HttpStatus status, String type, Map headers) {
super(status, headers);
this.type = type;
}
public ImageResult(T result) {
super(result);
this.type = ContentType.PNG.type();
}
public ImageResult(T result, String type) {
super(result);
this.type = type;
}
public ImageResult(T result, String type, Map headers) {
super(result, headers);
this.type = type;
}
public ImageResult(HttpStatus status, T result, String type) {
super(status, result);
this.type = type;
}
public ImageResult(HttpStatus status, T result, String type, Map headers) {
super(status, result, headers);
this.type = type;
}
public String getType() {
return type;
}
}