public class DefaultHttpRpcResponse extends AbstractHttpRpcResponse
BUFFER_SIZE, CHARSET, DATE_FORMAT, DIR_ALLOWED, exchange, GZIP_ENABLE, GZIP_FILE_EXT, GZIP_MIN_SIZE, HOME_PAGE, MSG_304, MSG_403, MSG_404, MSG_HTML, ROOTACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCESS_CONTROL_ALLOW_CREDENTIALS, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_MAX_AGE, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TYPE, DEFAULT_CHARSET, DEFAULT_DIR_ALLOWED, DEFAULT_GZIP_ENABLE, DEFAULT_GZIP_FILE_EXT, DEFAULT_GZIP_MIN_SIZE, DEFAULT_HOME_PAGE, DEFAULT_MSG_304, DEFAULT_MSG_403, DEFAULT_MSG_404, DEFAULT_MSG_HTML, DEFAULT_ROOT, ENCODING_GZIP, ETAG, IF_MODIFIED_SINCE, IF_NONE_MATCH, KEY_CORS_ALLOW_CREDENTIALS, KEY_CORS_ALLOW_HEADERS, KEY_CORS_ALLOW_METHODS, KEY_CORS_ALLOW_ORIGIN, KEY_CORS_ENABLE, KEY_CORS_MAX_AGE, LAST_MODIFIED| 构造器和说明 |
|---|
DefaultHttpRpcResponse() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
responseBytes(byte[] data) |
protected void |
responseDirectory(File directory) |
protected void |
responseDynamicFile(File file) |
protected void |
responseError(int code) |
protected void |
responseFile(File file,
boolean dynamic) |
protected void |
responseGzip(File file) |
protected void |
responseHtml(int code,
String html) |
protected void |
responseOk(String html) |
protected void |
responseStaticFile(File file) |
protected void |
responseStream(File file) |
protected void |
responseString(int code,
String contentType,
String s) |
void |
send(Object o) |
void |
sendPage(com.nlf.extend.web.view.PageView view) |
void |
sendRedirect(com.nlf.extend.web.view.RedirectView view) |
void |
sendResource(String path,
boolean dynamic)
发送资源
|
void |
sendStream(InputStream inputStream) |
protected void |
sendStream(InputStream inputStream,
String contentType) |
void |
sendStream(com.nlf.extend.web.view.StreamView streamView) |
void |
sendString(String s) |
void |
sendString(String s,
String contentType) |
getHttpExchange, gzip, setHttpExchangepublic void send(Object o) throws IOException
send 在接口中 com.nlf.core.IResponsesend 在类中 com.nlf.core.AbstractResponseIOExceptionpublic void sendRedirect(com.nlf.extend.web.view.RedirectView view)
throws IOException
IOExceptionpublic void sendPage(com.nlf.extend.web.view.PageView view)
throws IOException
IOExceptionpublic void sendString(String s) throws IOException
IOExceptionpublic void sendString(String s, String contentType) throws IOException
IOExceptionpublic void sendStream(com.nlf.extend.web.view.StreamView streamView)
throws IOException
IOExceptionprotected void sendStream(InputStream inputStream, String contentType) throws IOException
IOExceptionpublic void sendStream(InputStream inputStream) throws IOException
IOExceptionpublic void sendResource(String path, boolean dynamic) throws IOException
IHttpRpcResponsepath - 资源路径dynamic - 是否动态资源IOException - IO异常protected void responseDirectory(File directory) throws IOException
IOExceptionprotected void responseOk(String html) throws IOException
IOExceptionprotected void responseError(int code)
throws IOException
IOExceptionprotected void responseHtml(int code,
String html)
throws IOException
IOExceptionprotected void responseString(int code,
String contentType,
String s)
throws IOException
IOExceptionprotected void responseBytes(byte[] data)
throws IOException
IOExceptionprotected void responseFile(File file, boolean dynamic) throws IOException
IOExceptionprotected void responseDynamicFile(File file) throws IOException
IOExceptionprotected void responseStaticFile(File file) throws IOException
IOExceptionprotected void responseStream(File file) throws IOException
IOExceptionprotected void responseGzip(File file) throws IOException
IOExceptionCopyright © 2020. All Rights Reserved.