public interface GodfsApiClient
| Modifier and Type | Method and Description |
|---|---|
void |
download(String path,
IReader byteReceiver) |
void |
download(String path,
long start,
long offset,
IReader byteReceiver)
download file using file path which pattern like 'G01/001/S/<md5>'
|
FileEntity |
query(String pathOrMd5)
query file info from tracker server.
|
String |
upload(File file)
upload local file.
|
String |
upload(File file,
String group,
IMonitor<MonitorProgressBean> monitor)
upload local file.
|
String |
upload(javax.servlet.http.HttpServletRequest request)
streaming api for uploading file.
NOTE: this way needs storage server enable http upload. |
String |
upload(javax.servlet.http.HttpServletRequest request,
String group,
IMonitor<MonitorProgressBean> monitor,
String protocol)
streaming api for uploading file.
NOTE: this way needs storage server enable http upload. |
String |
upload(InputStream ips,
long fileSize)
upload file in stream mode.
|
String |
upload(InputStream ips,
long fileSize,
String group,
IMonitor<MonitorProgressBean> monitor)
upload file in stream mode.
|
FileEntity query(String pathOrMd5) throws Exception
pathOrMd5 - path like "G01/001/90234afcbba2314123112390234afcbb" or just a file md5ExceptionString upload(InputStream ips, long fileSize, String group, IMonitor<MonitorProgressBean> monitor) throws Exception
ips - fileSize - group - the group of the filemonitor - upload progress monitorExceptionString upload(InputStream ips, long fileSize) throws Exception
ips - fileSize - ExceptionString upload(File file, String group, IMonitor<MonitorProgressBean> monitor) throws Exception
file - the file to be uploadedgroup - the group of the filemonitor - upload progress monitorExceptionString upload(File file) throws Exception
file - the file to be uploadedExceptionString upload(javax.servlet.http.HttpServletRequest request, String group, IMonitor<MonitorProgressBean> monitor, String protocol) throws Exception
request - the http request, if you are using spring ---------------------------group - the group of the filemonitor - upload progress monitorprotocol - only http or https, default is http.ExceptionString upload(javax.servlet.http.HttpServletRequest request) throws Exception
request - the http request, if you are using spring ---------------------------Exceptionvoid download(String path, long start, long offset, IReader byteReceiver) throws Exception
path - file path which pattern like 'G01/001/S/<md5>'start - download file start position.offset - download bytes offset, -1 represents the end of the file.byteReceiver - byte receiver handling download file bytes.Exceptionvoid download(String path, IReader byteReceiver) throws Exception
Exceptiondownload(String, long, long, IReader)Copyright © 2018. All rights reserved.