org.csource.fastdfs
Class DownloadStream

java.lang.Object
  extended by org.csource.fastdfs.DownloadStream
All Implemented Interfaces:
DownloadCallback

public class DownloadStream
extends java.lang.Object
implements DownloadCallback

Download file by stream (download callback class)

Version:
Version 1.11
Author:
zhouzezhong & Happy Fish / YuQing

Constructor Summary
DownloadStream(java.io.OutputStream out)
           
 
Method Summary
 int recv(long fileSize, byte[] data, int bytes)
          recv file content callback function, may be called more than once when the file downloaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadStream

public DownloadStream(java.io.OutputStream out)
Method Detail

recv

public int recv(long fileSize,
                byte[] data,
                int bytes)
recv file content callback function, may be called more than once when the file downloaded

Specified by:
recv in interface DownloadCallback
Parameters:
fileSize - file size
data - data buff
bytes - data bytes
Returns:
0 success, return none zero(errno) if fail