class StreamResource extends AbstractStreamResource {

    public StreamResource setContentType(String contentType) {
        if (contentType == null) {
            throw new IllegalArgumentException("Content type cannot be null");
        }
        setContentTypeResolver((resource, context) -> contentType);
        return this;
    }

    public  StreamResource(String name, StreamResourceWriter writer);
    public  StreamResource(String name, InputStreamFactory factory);

}