protected class StaticFileHandler.FileWorker extends AbstractResourceHandler.IOWorker
| 限定符和类型 | 字段和说明 |
|---|---|
private File |
file |
private long |
maxAge |
private HttpRequest |
request |
private HttpResponse |
response |
control, path| 限定符 | 构造器和说明 |
|---|---|
protected |
StaticFileHandler.FileWorker(HttpRequest request,
HttpResponse response,
HttpControl control,
long maxAge) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected byte[] |
directoryListingBytes() |
protected boolean |
exists() |
protected byte[] |
fileBytes() |
private Date |
fromHeader(String date) |
protected boolean |
isDirectory() |
private String |
MD5(String md5) |
private String |
mimeType(String uri) |
private byte[] |
read(File file) |
protected File |
resolveFile(String path) |
private String |
toHeader(Date date) |
protected byte[] |
welcomeBytes() |
error, extractQuery, notFound, read, run, withoutQueryprivate File file
private final HttpResponse response
private final HttpRequest request
private final long maxAge
protected StaticFileHandler.FileWorker(HttpRequest request, HttpResponse response, HttpControl control, long maxAge)
protected boolean exists()
throws IOException
exists 在类中 AbstractResourceHandler.IOWorkerIOExceptionprotected boolean isDirectory()
throws IOException
isDirectory 在类中 AbstractResourceHandler.IOWorkerIOExceptionprotected byte[] fileBytes()
throws IOException
fileBytes 在类中 AbstractResourceHandler.IOWorkerIOExceptionprotected byte[] welcomeBytes()
throws IOException
welcomeBytes 在类中 AbstractResourceHandler.IOWorkerIOExceptionprotected byte[] directoryListingBytes()
throws IOException
private byte[] read(File file) throws IOException
IOExceptionprotected File resolveFile(String path) throws IOException
IOExceptionCopyright © 2014. All rights reserved.