/** * Add bytes data to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param data A byte Array (byte[]) representing the contents of the file * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, byte[] data) { return addFilePart(new BytePart(name, filename, data)); }
/** * Add bytes data to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param contentType The content type of File, possible values could be "text/plain", "application/json" etc * @param data A byte Array (byte[]) representing the contents of the file * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, byte[] data) { return addFilePart(new BytePart(name, filename, contentType, data)); }
/** * Add bytes data to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param contentType The content type of File, possible values could be "text/plain", "application/json" etc * @param data A byte Array (byte[]) representing the contents of the file * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, byte[] data) { return addFilePart(new BytePart(name, filename, contentType, data)); }
/** * Add bytes data to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param data A byte Array (byte[]) representing the contents of the file * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, byte[] data) { return addFilePart(new BytePart(name, filename, data)); }
/** * Add bytes data to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param contentType The content type of File, possible values could be "text/plain", "application/json" etc * @param data A byte Array (byte[]) representing the contents of the file * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, byte[] data) { return addFilePart(new BytePart(name, filename, contentType, data)); }
/** * Add bytes data to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param data A byte Array (byte[]) representing the contents of the file * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, byte[] data) { return addFilePart(new BytePart(name, filename, data)); }