public abstract class UploadDownloadUtils extends Object
| 构造器和说明 |
|---|
UploadDownloadUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static com.alibaba.fastjson2.JSONObject |
checkFileRange(com.centit.fileserver.common.FileStore fileStore,
com.centit.fileserver.common.FileBaseInfo fileInfo,
long size) |
static com.centit.fileserver.po.FileInfo |
createFileBaseInfo(javax.servlet.http.HttpServletRequest request) |
static com.centit.fileserver.po.FileInfo |
createFileBaseInfo(javax.servlet.http.HttpServletRequest request,
String fileMd5,
long fileSize) |
static com.centit.fileserver.po.FileInfo |
createFileBaseInfo(String fileIdIncludeMd5AndSize) |
static void |
downFileRange(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
InputStream inputStream,
long fSize,
String fileName,
String downloadType,
String charset) |
static void |
downloadFile(InputStream downloadFile,
String fileName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static void |
downloadFile(InputStream downloadFile,
String fileName,
javax.servlet.http.HttpServletResponse response) |
static String |
encodeDownloadFilename(String paramName) |
static String |
encodeDownloadFilename(String paramName,
String downloadType) |
static String |
encodeFileName(String fileName,
String characterEncoding) |
static org.apache.commons.lang3.tuple.Pair<String,InputStream> |
fetchInputStreamFromMultipartResolver(javax.servlet.http.HttpServletRequest request) |
static org.apache.commons.lang3.tuple.Pair<String,InputStream> |
fetchInputStreamFromRequest(javax.servlet.http.HttpServletRequest request)
已过时。
|
static org.apache.commons.lang3.tuple.Pair<String,InputStream> |
fetchInputStreamFromRequest(javax.servlet.http.HttpServletRequest request,
boolean useCommonsReolver) |
static org.apache.commons.lang3.tuple.Pair<String,InputStream> |
fetchInputStreamFromStandardResolver(javax.servlet.http.HttpServletRequest request) |
static com.alibaba.fastjson2.JSONObject |
makeRangeCheckJson(long rangeFileSize,
String fileMd5,
boolean hasStored) |
static com.alibaba.fastjson2.JSONObject |
makeRangeUploadCompleteJson(long fileSize,
Object fileInfo,
String message) |
static com.alibaba.fastjson2.JSONObject |
makeRangeUploadCompleteJson(String fileMd5,
long fileSize,
String fileName,
String fileId,
String message) |
static com.alibaba.fastjson2.JSONObject |
makeRangeUploadJson(long rangeFileSize,
String fileMd5,
String fileName) |
static long |
uploadRange(String tempFilePath,
InputStream fileInputStream,
String token,
long size,
javax.servlet.http.HttpServletRequest request) |
public static com.alibaba.fastjson2.JSONObject checkFileRange(com.centit.fileserver.common.FileStore fileStore,
com.centit.fileserver.common.FileBaseInfo fileInfo,
long size)
public static org.apache.commons.lang3.tuple.Pair<String,InputStream> fetchInputStreamFromRequest(javax.servlet.http.HttpServletRequest request, boolean useCommonsReolver) throws IOException
IOExceptionpublic static org.apache.commons.lang3.tuple.Pair<String,InputStream> fetchInputStreamFromMultipartResolver(javax.servlet.http.HttpServletRequest request) throws IOException
IOExceptionpublic static org.apache.commons.lang3.tuple.Pair<String,InputStream> fetchInputStreamFromStandardResolver(javax.servlet.http.HttpServletRequest request) throws IOException
IOException@Deprecated public static org.apache.commons.lang3.tuple.Pair<String,InputStream> fetchInputStreamFromRequest(javax.servlet.http.HttpServletRequest request) throws IOException, org.apache.commons.fileupload.FileUploadException
IOExceptionorg.apache.commons.fileupload.FileUploadExceptionpublic static String encodeDownloadFilename(String paramName, String downloadType)
public static void downFileRange(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
InputStream inputStream,
long fSize,
String fileName,
String downloadType,
String charset)
throws IOException
request - HttpServletRequestresponse - HttpServletResponseinputStream - InputStreamfSize - longfileName - fileNamedownloadType - 下载方式charset - 编码IOException - IOExceptionpublic static long uploadRange(String tempFilePath, InputStream fileInputStream, String token, long size, javax.servlet.http.HttpServletRequest request) throws IOException, com.centit.support.common.ObjectException
tempFilePath - 需要保存的临时文件路径token - Stringsize - longfileInputStream - InputStreamrequest - HttpServletRequestIOException - IOExceptioncom.centit.support.common.ObjectException - ObjectExceptionpublic static com.alibaba.fastjson2.JSONObject makeRangeCheckJson(long rangeFileSize,
String fileMd5,
boolean hasStored)
public static com.alibaba.fastjson2.JSONObject makeRangeUploadJson(long rangeFileSize,
String fileMd5,
String fileName)
public static com.alibaba.fastjson2.JSONObject makeRangeUploadCompleteJson(long fileSize,
Object fileInfo,
String message)
public static com.alibaba.fastjson2.JSONObject makeRangeUploadCompleteJson(String fileMd5, long fileSize, String fileName, String fileId, String message)
public static void downloadFile(InputStream downloadFile, String fileName, javax.servlet.http.HttpServletResponse response) throws IOException
IOExceptionpublic static void downloadFile(InputStream downloadFile, String fileName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOExceptionpublic static com.centit.fileserver.po.FileInfo createFileBaseInfo(javax.servlet.http.HttpServletRequest request)
public static com.centit.fileserver.po.FileInfo createFileBaseInfo(javax.servlet.http.HttpServletRequest request,
String fileMd5,
long fileSize)
public static com.centit.fileserver.po.FileInfo createFileBaseInfo(String fileIdIncludeMd5AndSize)
Copyright © 2025 Centit Information Technical, co. Inc.. All rights reserved.