- 论坛徽章:
- 0
|
本帖最后由 doit_zzg 于 2012-04-02 10:23 编辑
回复 3# happystar22
/**
* download file from storage server
* @param file_id the file id(including group name and filename)
* @param file_offset the start offset of the file
* @param download_bytes download bytes, 0 for remain bytes from offset
* @return file content/buff, return null if fail
*/
public byte[] download_file1(String file_id, long file_offset, long download_bytes) throws IOException, Exception
{
String[] parts = new String[2];
this.errno = this.split_file_id(file_id, parts);
if (this.errno != 0)
{
return null;
}
return this.download_file(parts[0], parts[1], file_offset, download_bytes);
}
注意上面的file_offset参数
|
|