org.csource.fastdfs
Class StorageClient.UploadBuff

java.lang.Object
  extended by org.csource.fastdfs.StorageClient.UploadBuff
All Implemented Interfaces:
UploadCallback
Enclosing class:
StorageClient

public static class StorageClient.UploadBuff
extends java.lang.Object
implements UploadCallback

Upload file by file buff

Version:
Version 1.12
Author:
Happy Fish / YuQing

Constructor Summary
StorageClient.UploadBuff(byte[] fileBuff, int offset, int length)
          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

StorageClient.UploadBuff

public StorageClient.UploadBuff(byte[] fileBuff,
                                int offset,
                                int length)
constructor

Parameters:
fileBuff - the file buff for uploading
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