public class Resource extends BuildAndRenderableResponse<Resource>
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CONTENT_DISPOSITION |
| Modifier | Constructor and Description |
|---|---|
protected |
Resource(ReadableBuffer input,
String fileName) |
protected |
Resource(ReadableBuffer input,
String fileName,
String contentType) |
protected |
Resource(ReadableBuffer input,
String fileName,
String contentType,
String charset) |
| Modifier and Type | Method and Description |
|---|---|
static Resource |
as(File file) |
static Resource |
as(ReadableBuffer input) |
static Resource |
as(ReadableBuffer input,
String fileName) |
static Resource |
as(ReadableBuffer input,
String fileName,
String contentType) |
static Resource |
asFilePath(String filePath) |
protected String |
createContentDisposition() |
protected ResponseEntity |
extractResponseEntity(RequestContext request,
ResponseContext response) |
String |
getCharset() |
protected String |
getDisposition() |
protected String |
getFileName() |
protected ReadableBuffer |
getInputStream() |
Resource |
inline() |
protected void |
mergeHeaders(RequestContext request,
ResponseContext response,
Map<String,String> headers,
ResponseEntity entity) |
protected boolean |
withContentDisposition() |
Resource |
withoutContentDisposition() |
entity, header, header, status, statusaddHeader, addHeaders, createResponse, getHeaders, getResponseEntity, getStatus, putEntityToResponse, render, setResponseEntity, setStatus, setStatus, updateStatusToResponseprotected static final String CONTENT_DISPOSITION
protected Resource(ReadableBuffer input, String fileName)
protected Resource(ReadableBuffer input, String fileName, String contentType)
protected Resource(ReadableBuffer input, String fileName, String contentType, String charset)
public static Resource as(ReadableBuffer input)
public static Resource as(ReadableBuffer input, String fileName)
public static Resource as(ReadableBuffer input, String fileName, String contentType)
protected void mergeHeaders(RequestContext request, ResponseContext response, Map<String,String> headers, ResponseEntity entity)
mergeHeaders in class DefaultRenderableprotected ResponseEntity extractResponseEntity(RequestContext request, ResponseContext response)
extractResponseEntity in class DefaultRenderableprotected String createContentDisposition() throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected String getFileName()
protected ReadableBuffer getInputStream()
protected String getDisposition()
protected boolean withContentDisposition()
public String getCharset()
public Resource inline()
public Resource withoutContentDisposition()
Copyright © 2011-2017 Analog Web Framework Development Team. All Rights Reserved.