org.csource.fastdfs
Class UploadStream

java.lang.Object
  extended by org.csource.fastdfs.UploadStream
All Implemented Interfaces:
UploadCallback

public class UploadStream
extends java.lang.Object
implements UploadCallback

Upload file by stream

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

Constructor Summary
UploadStream(java.io.InputStream inputStream, long fileSize)
          constructor
 
Method Summary
 int send(java.io.OutputStream out)
          send file content callback function, be called only once when the file uploaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadStream

public UploadStream(java.io.InputStream inputStream,
                    long fileSize)
constructor

Parameters:
inputStream - input stream for uploading
fileSize - size of uploaded file
Method Detail

send

public int send(java.io.OutputStream out)
         throws java.io.IOException
send file content callback function, be called only once when the file uploaded

Specified by:
send in interface UploadCallback
Parameters:
out - output stream for writing file content
Returns:
0 success, return none zero(errno) if fail
Throws:
java.io.IOException