public class GodfsApiClientImpl extends Object implements 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>'
|
static GodfsApiClient |
getInstance(ClientConfigurationBean configuration) |
FileEntity |
query(String pathOrMd5)
query file info from tracker server.
|
String |
upload(File file,
String group,
IMonitor<MonitorProgressBean> monitor)
upload local file.
|
String |
upload(InputStream ips,
long fileSize,
String group,
IMonitor<MonitorProgressBean> monitor)
upload file in stream mode.
|
public static final GodfsApiClient getInstance(ClientConfigurationBean configuration)
public FileEntity query(String pathOrMd5) throws Exception
GodfsApiClientquery in interface GodfsApiClientpathOrMd5 - path like "G01/001/90234afcbba2314123112390234afcbb" or just a file md5Exceptionpublic String upload(InputStream ips, long fileSize, String group, IMonitor<MonitorProgressBean> monitor) throws Exception
GodfsApiClientupload in interface GodfsApiClientExceptionpublic String upload(File file, String group, IMonitor<MonitorProgressBean> monitor) throws Exception
GodfsApiClientupload in interface GodfsApiClientExceptionpublic void download(String path, long start, long offset, IReader byteReceiver) throws Exception
GodfsApiClientdownload in interface GodfsApiClientpath - 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.Exceptionpublic void download(String path, IReader byteReceiver) throws Exception
download in interface GodfsApiClientExceptionGodfsApiClient.download(String, long, long, IReader)Copyright © 2018. All rights reserved.