/** * upload file to storage server (by file buff, slave file mode) * * @param group_name the group name of master file * @param master_filename the master file name to generate the slave file * @param prefix_name the prefix name to generate the slave file * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, String master_filename, String prefix_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { if ((group_name == null || group_name.length() == 0) || (master_filename == null || master_filename.length() == 0) || (prefix_name == null)) { throw new MyException("invalid arguement"); } return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_SLAVE_FILE, group_name, master_filename, prefix_name, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to upload * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, length, new UploadBuff(file_buff, offset, length), meta_list); }
/** * upload appender file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to upload * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, length, new UploadBuff(file_buff, offset, length), meta_list); }
/** * upload file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to upload * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, length, new UploadBuff(file_buff, offset, length), meta_list); }
/** * upload appender file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to upload * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, length, new UploadBuff(file_buff, offset, length), meta_list); }
/** * upload file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to upload * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, length, new UploadBuff(file_buff, offset, length), meta_list); }
/** * upload appender file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to upload * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, int offset, int length, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, length, new UploadBuff(file_buff, offset, length), meta_list); }
/** * upload file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload appender file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload appender file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to berth the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * modify appender file to storage server (by file buff) * @param group_name the group name of appender file * @param appender_filename the appender filename * @param file_offset the offset of appender file * @param file_buff file content/buff * @param buffer_offset start offset of the buff * @param buffer_length the length of buff to modify * @return 0 for success, != 0 for error (error no) */ public int modify_file(String group_name, String appender_filename, long file_offset, byte[] file_buff, int buffer_offset, int buffer_length) throws IOException, MyException { return this.do_modify_file(group_name, appender_filename, file_offset, buffer_length, new UploadBuff(file_buff, buffer_offset, buffer_length)); }
/** * upload file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload appender file to storage server (by file buff) * * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, MyException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * upload appender file to storage server (by file buff) * @param group_name the group name to upload file to, can be empty * @param file_buff file content/buff * @param file_ext_name file ext name, do not include dot(.) * @param meta_list meta info array * @return 2 elements string array if success:<br> * <ul><li>results[0]: the group name to store the file</li></ul> * <ul><li>results[1]: the new created filename</li></ul> * return null if fail */ public String[] upload_appender_file(String group_name, byte[] file_buff, String file_ext_name, NameValuePair[] meta_list) throws IOException, FsException { return this.do_upload_file(ProtoCommon.STORAGE_PROTO_CMD_UPLOAD_APPENDER_FILE, group_name, null, null, file_ext_name, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length), meta_list); }
/** * modify appender file to storage server (by file buff) * * @param group_name the group name of appender file * @param appender_filename the appender filename * @param file_offset the offset of appender file * @param file_buff file content/buff * @param buffer_offset start offset of the buff * @param buffer_length the length of buff to modify * @return 0 for success, != 0 for error (error no) */ public int modify_file(String group_name, String appender_filename, long file_offset, byte[] file_buff, int buffer_offset, int buffer_length) throws IOException, MyException { return this.do_modify_file(group_name, appender_filename, file_offset, buffer_length, new UploadBuff(file_buff, buffer_offset, buffer_length)); }
/** * modify appender file to storage server (by file buff) * * @param group_name the group name of appender file * @param appender_filename the appender filename * @param file_offset the offset of appender file * @param file_buff file content/buff * @param buffer_offset start offset of the buff * @param buffer_length the length of buff to modify * @return 0 for success, != 0 for error (error no) */ public int modify_file(String group_name, String appender_filename, long file_offset, byte[] file_buff, int buffer_offset, int buffer_length) throws IOException, MyException { return this.do_modify_file(group_name, appender_filename, file_offset, buffer_length, new UploadBuff(file_buff, buffer_offset, buffer_length)); }
/** * modify appender file to storage server (by file buff) * @param group_name the group name of appender file * @param appender_filename the appender filename * @param file_offset the offset of appender file * @param file_buff file content/buff * @return 0 for success, != 0 for error (error no) */ public int modify_file(String group_name, String appender_filename, long file_offset, byte[] file_buff) throws IOException, MyException { return this.do_modify_file(group_name, appender_filename, file_offset, file_buff.length, new UploadBuff(file_buff, 0, file_buff.length)); }
/** * append file to storage server (by file buff) * @param group_name the group name of appender file * @param appender_filename the appender filename * @param file_buff file content/buff * @param offset start offset of the buff * @param length the length of buff to append * @return 0 for success, != 0 for error (error no) */ public int append_file(String group_name, String appender_filename, byte[] file_buff, int offset, int length) throws IOException, MyException { return this.do_append_file(group_name, appender_filename, length, new UploadBuff(file_buff, offset, length)); }