public class FileHandler extends AbstractHandler implements Handler
| 限定符和类型 | 字段和说明 |
|---|---|
static ConfigOption |
DEFAULT_FILE_OPTION |
static String |
IF_MODIFIED |
static String |
LAST_MODIFIED_KEY |
static String |
RANGE_HEADER_KEY |
static ConfigOption |
ROOT_OPTION |
DEFAULT_RESOURCE_OPTION, handlerName, logger, RESOURCE_MOUNT_OPTION, RULE_OPTION, server, URL_PREFIX_OPTION, urlPrefixCKEY, CUSSCLASSNAME, httpHeaderArr, pattArr, ProjectName, ProjectVersionName, RefererHeard, VVVERSION| 构造器和说明 |
|---|
FileHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
handleBody(HttpRequest request,
HttpResponse response) |
boolean |
initialize(String handlerName,
Server server) |
static void |
sendFile(HttpRequest request,
HttpResponse response,
File file,
String type) |
copyStreamToFile, copyStreamToFile, createQueryMap, formatPath, getAllParamMap, getContentType, getContextMap, getExtStr, getInputStream, getMimeType, getName, getOgnlContext, getPathParamsValue, getProjectName, getRequestMethodBean, getServer, getService, getUrlPrefix, handle, invokMethod, invokMethod, isNullParams, isRequestdForHandler, sendFtl, sendJSON, setOgnlContext, setServer, shutdown, uploadpublic static final ConfigOption ROOT_OPTION
public static final ConfigOption DEFAULT_FILE_OPTION
public boolean initialize(String handlerName, Server server)
initialize 在接口中 Handlerinitialize 在类中 AbstractHandlerprotected boolean handleBody(HttpRequest request, HttpResponse response) throws IOException
handleBody 在类中 AbstractHandlerIOExceptionpublic static void sendFile(HttpRequest request, HttpResponse response, File file, String type) throws IOException
IOExceptionCopyright © 2025 onecode. All rights reserved.