| Constructor and Description |
|---|
OsFileStore() |
OsFileStore(String fileRoot) |
| Modifier and Type | Method and Description |
|---|---|
String |
calcFilePath(String fileStoreUrl) |
boolean |
checkFile(String fileStoreUrl)
检查文件是否存在,如果存在则实现秒传
|
boolean |
deleteFile(String fileUrl) |
File |
getFile(String fileStoreUrl) |
String |
getFileAccessUrl(String fileStoreUrl) |
long |
getFileSize(String fileStoreUrl) |
InputStream |
loadFileStream(String fileStoreUrl) |
String |
matchFileStoreUrl(FileBaseInfo fileInfo,
long fileSize) |
String |
saveFile(FileBaseInfo fileInfo,
long fileSize,
InputStream is) |
String |
saveFile(String sourFilePath,
FileBaseInfo fileInfo,
long fileSize) |
void |
setFileRoot(String fileRoot) |
public OsFileStore()
public OsFileStore(String fileRoot)
public void setFileRoot(String fileRoot)
public String matchFileStoreUrl(FileBaseInfo fileInfo, long fileSize)
matchFileStoreUrl in interface FileStorefileInfo - 文件信息fileSize - long 文件的大小 不再使用public String saveFile(FileBaseInfo fileInfo, long fileSize, InputStream is) throws IOException
saveFile in interface FileStoreIOExceptionpublic String saveFile(String sourFilePath, FileBaseInfo fileInfo, long fileSize) throws IOException
saveFile in interface FileStoreIOExceptionpublic boolean checkFile(String fileStoreUrl)
public long getFileSize(String fileStoreUrl) throws IOException
getFileSize in interface FileStoreIOExceptionpublic InputStream loadFileStream(String fileStoreUrl) throws IOException
loadFileStream in interface FileStoreIOExceptionpublic File getFile(String fileStoreUrl) throws IOException
getFile in interface FileStoreIOExceptionpublic boolean deleteFile(String fileUrl) throws IOException
deleteFile in interface FileStoreIOExceptionpublic String getFileAccessUrl(String fileStoreUrl)
getFileAccessUrl in interface FileStoreCopyright © 2024 Centit Information Technical, co. Inc.. All rights reserved.