public class FileClientImpl extends Object implements FileClient
| 构造器和说明 |
|---|
FileClientImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.http.impl.client.CloseableHttpClient |
allocHttpClient() |
String |
applyUploadFiles(org.apache.http.impl.client.CloseableHttpClient httpClient,
int maxUploadFiles) |
String |
applyUploadFiles(int maxUploadFiles) |
void |
deleteFile(String fileId) |
void |
downloadFile(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
String filePath) |
void |
downloadFile(String fileId,
String filePath) |
void |
downloadFileRange(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
int offset,
int length,
String filePath) |
void |
downloadFileRange(String fileId,
int offset,
int length,
String filePath) |
String |
getAttachFileUrl(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
int expireTime)
附属文件下载url
|
String |
getAttachFileUrl(String fileId,
int expireTime)
附属文件下载url
|
String |
getAttachFileUrlLimitTimes(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
int downloadTime)
附属文件下载url 不限制时间,限制下载次数
|
String |
getAttachFileUrlLimitTimes(String fileId,
int downloadTime)
附属文件下载url 不限制时间,限制下载次数
|
FileInfo |
getFileInfo(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId) |
FileInfo |
getFileInfo(String fileId) |
FileLibraryInfo |
getFileLibrary(String topUnit,
String libraryId) |
long |
getFileRangeStart(org.apache.http.impl.client.CloseableHttpClient httpClient,
File file) |
long |
getFileRangeStart(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileMd5,
long fileSize) |
long |
getFileRangeStart(File file) |
long |
getFileRangeStart(String fileMd5,
long fileSize) |
long |
getFileSizeByFileId(String fileId) |
long |
getFileSizeByStoreUrl(String fileStoreUrl) |
String |
getFileUrl(org.apache.http.impl.client.CloseableHttpClient httpClient,
FileAccessLog aacessLog) |
String |
getFileUrl(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
int expireTime)
文件下载url
|
String |
getFileUrl(FileAccessLog aacessLog) |
String |
getFileUrl(String fileId,
int expireTime)
文件下载url
|
String |
getFileUrlLimitTimes(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
int downloadTime)
文件下载url 不限制时间,限制下载次数
|
String |
getFileUrlLimitTimes(String fileId,
int downloadTime)
文件下载url 不限制时间,限制下载次数
|
void |
init(String appServerUrl,
String appServerLoginUrl,
String userCode,
String password,
String appServerExportUrl)
#文件服务器
|
String |
insertFileLibrary(FileLibraryInfo fileLibrary) |
String |
matchFileStoreUrl(FileInfo fi,
long fileSize) |
void |
releaseHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
void |
setAppSession(com.centit.framework.appclient.AppSession appSession) |
void |
setFileServerExportUrl(String fileServerUrl) |
String |
storeFile(InputStream file) |
boolean |
updateFileInfo(org.apache.http.impl.client.CloseableHttpClient httpClient,
FileInfo fi) |
boolean |
updateFileInfo(FileInfo fi) |
FileInfo |
uploadFile(org.apache.http.impl.client.CloseableHttpClient httpClient,
FileInfo fi,
File file) |
FileInfo |
uploadFile(org.apache.http.impl.client.CloseableHttpClient httpClient,
FileInfo fi,
InputStream inputStream) |
FileInfo |
uploadFile(FileInfo fi,
File file) |
FileInfo |
uploadFile(FileInfo fi,
InputStream inputStream) |
FileInfo |
uploadFileRange(org.apache.http.impl.client.CloseableHttpClient httpClient,
FileInfo fi,
File file,
long rangeStart,
long rangeSize) |
FileInfo |
uploadFileRange(FileInfo fi,
File file,
long rangeStart,
long rangeSize) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyUploadFilepublic void init(String appServerUrl, String appServerLoginUrl, String userCode, String password, String appServerExportUrl)
appServerUrl - fileserver.url = http://codefanbook:8180/product-uploader/fileserverappServerLoginUrl - fileserver.login.url = http://codefanbook:8180/product-uploader/systemuserCode - fileserver.userCode =u0000000password - fileserver.password =000000appServerExportUrl - # 文件服务器对外url 这个和 fileserver.url 不一定一样 fileserver.url 是内容文件服务器url
# fileserver.export.url 是对外的url,由于可能存在 nginx反向代理所以可能不一样
# fileserver.export.url = http://codefanbook:8180/product-uploaderpublic void setAppSession(com.centit.framework.appclient.AppSession appSession)
public void setFileServerExportUrl(String fileServerUrl)
public org.apache.http.impl.client.CloseableHttpClient allocHttpClient()
allocHttpClient 在接口中 FileClientpublic void releaseHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
releaseHttpClient 在接口中 FileClientpublic String getFileUrl(org.apache.http.impl.client.CloseableHttpClient httpClient, FileAccessLog aacessLog) throws IOException
getFileUrl 在接口中 FileClientIOExceptionpublic String getFileUrl(FileAccessLog aacessLog) throws IOException
getFileUrl 在接口中 FileClientIOExceptionpublic String applyUploadFiles(org.apache.http.impl.client.CloseableHttpClient httpClient, int maxUploadFiles) throws IOException
applyUploadFiles 在接口中 FileClientIOExceptionpublic String applyUploadFiles(int maxUploadFiles) throws IOException
applyUploadFiles 在接口中 FileClientIOExceptionpublic String getAttachFileUrl(org.apache.http.impl.client.CloseableHttpClient httpClient, String fileId, int expireTime) throws IOException
FileClientgetAttachFileUrl 在接口中 FileClienthttpClient - CloseableHttpClientfileId - 文档IDexpireTime - 失效期限 按照分钟计算IOException - IOExceptionpublic String getFileUrl(org.apache.http.impl.client.CloseableHttpClient httpClient, String fileId, int expireTime) throws IOException
FileClientgetFileUrl 在接口中 FileClienthttpClient - CloseableHttpClientfileId - 文件IDexpireTime - 失效期限 按照分钟计算IOException - IOExceptionpublic String getAttachFileUrl(String fileId, int expireTime) throws IOException
FileClientgetAttachFileUrl 在接口中 FileClientfileId - 文件IDexpireTime - 失效期限 按照分钟计算IOException - IOExceptionpublic String getFileUrl(String fileId, int expireTime) throws IOException
FileClientgetFileUrl 在接口中 FileClientfileId - 文件IDexpireTime - 失效期限 按照分钟计算IOException - IOExceptionpublic String getAttachFileUrlLimitTimes(org.apache.http.impl.client.CloseableHttpClient httpClient, String fileId, int downloadTime) throws IOException
FileClientgetAttachFileUrlLimitTimes 在接口中 FileClienthttpClient - CloseableHttpClientfileId - 文档IDdownloadTime - 下载次数IOException - IOExceptionpublic String getFileUrlLimitTimes(org.apache.http.impl.client.CloseableHttpClient httpClient, String fileId, int downloadTime) throws IOException
FileClientgetFileUrlLimitTimes 在接口中 FileClienthttpClient - CloseableHttpClientfileId - 文档IDdownloadTime - 下载次数IOException - IOExceptionpublic String getAttachFileUrlLimitTimes(String fileId, int downloadTime) throws IOException
FileClientgetAttachFileUrlLimitTimes 在接口中 FileClientfileId - 文档IDdownloadTime - 下载次数IOException - IOExceptionpublic String getFileUrlLimitTimes(String fileId, int downloadTime) throws IOException
FileClientgetFileUrlLimitTimes 在接口中 FileClientfileId - 文档IDdownloadTime - 下载次数IOException - IOExceptionpublic FileInfo getFileInfo(org.apache.http.impl.client.CloseableHttpClient httpClient, String fileId) throws IOException
getFileInfo 在接口中 FileClientIOExceptionpublic boolean updateFileInfo(org.apache.http.impl.client.CloseableHttpClient httpClient,
FileInfo fi)
throws IOException
updateFileInfo 在接口中 FileClientIOExceptionpublic boolean updateFileInfo(FileInfo fi) throws IOException
updateFileInfo 在接口中 FileClientIOExceptionpublic FileInfo uploadFile(org.apache.http.impl.client.CloseableHttpClient httpClient, FileInfo fi, File file) throws IOException
uploadFile 在接口中 FileClientIOExceptionpublic FileInfo uploadFile(FileInfo fi, File file) throws IOException
uploadFile 在接口中 FileClientIOExceptionpublic FileInfo uploadFile(org.apache.http.impl.client.CloseableHttpClient httpClient, FileInfo fi, InputStream inputStream) throws IOException
uploadFile 在接口中 FileClientIOExceptionpublic FileInfo uploadFile(FileInfo fi, InputStream inputStream) throws IOException
uploadFile 在接口中 FileClientIOExceptionpublic long getFileRangeStart(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileMd5,
long fileSize)
throws IOException
getFileRangeStart 在接口中 FileClientIOExceptionpublic long getFileRangeStart(String fileMd5, long fileSize) throws IOException
getFileRangeStart 在接口中 FileClientIOExceptionpublic long getFileRangeStart(org.apache.http.impl.client.CloseableHttpClient httpClient,
File file)
throws IOException
getFileRangeStart 在接口中 FileClientIOExceptionpublic long getFileRangeStart(File file) throws IOException
getFileRangeStart 在接口中 FileClientIOExceptionpublic FileInfo uploadFileRange(org.apache.http.impl.client.CloseableHttpClient httpClient, FileInfo fi, File file, long rangeStart, long rangeSize) throws IOException
uploadFileRange 在接口中 FileClientIOExceptionpublic FileInfo uploadFileRange(FileInfo fi, File file, long rangeStart, long rangeSize) throws IOException
uploadFileRange 在接口中 FileClientIOExceptionpublic FileInfo getFileInfo(String fileId) throws IOException
getFileInfo 在接口中 FileClientIOExceptionpublic void downloadFileRange(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
int offset,
int length,
String filePath)
throws IOException
downloadFileRange 在接口中 FileClientIOExceptionpublic void downloadFileRange(String fileId, int offset, int length, String filePath) throws IOException
downloadFileRange 在接口中 FileClientIOExceptionpublic void downloadFile(org.apache.http.impl.client.CloseableHttpClient httpClient,
String fileId,
String filePath)
throws IOException
downloadFile 在接口中 FileClientIOExceptionpublic void downloadFile(String fileId, String filePath) throws IOException
downloadFile 在接口中 FileClientIOExceptionpublic String storeFile(InputStream file) throws IOException
storeFile 在接口中 FileClientIOExceptionpublic long getFileSizeByStoreUrl(String fileStoreUrl)
getFileSizeByStoreUrl 在接口中 FileClientpublic long getFileSizeByFileId(String fileId)
getFileSizeByFileId 在接口中 FileClientpublic void deleteFile(String fileId)
deleteFile 在接口中 FileClientpublic String insertFileLibrary(FileLibraryInfo fileLibrary)
insertFileLibrary 在接口中 FileClientpublic FileLibraryInfo getFileLibrary(String topUnit, String libraryId)
getFileLibrary 在接口中 FileClientpublic String matchFileStoreUrl(FileInfo fi, long fileSize)
matchFileStoreUrl 在接口中 FileClientCopyright © 2026 Centit Information Technical, co. Inc.. All rights reserved.