/** * Add a InputStream 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 An {@link InputStream} data value representing the content of file object * @param contentLength The size of the content to pass to {@link HttpDataFactory} in order to create * {@link io.netty.handler.codec.http.multipart.FileUpload} object * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, InputStream data, long contentLength) { return addFilePart(new InputStreamPart(name, filename, data, contentLength)); }
/** * Add a InputStream 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 An {@link InputStream} data value representing the content of file object * @param contentLength The size of the content to pass to {@link HttpDataFactory} in order to create * {@link io.netty.handler.codec.http.multipart.FileUpload} object * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, InputStream data, long contentLength) { return addFilePart(new InputStreamPart(name, filename, contentType, data, contentLength)); }
/** * Add a InputStream 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 An {@link InputStream} data value representing the content of file object * @param contentLength The size of the content to pass to {@link HttpDataFactory} in order to create * {@link io.netty.handler.codec.http.multipart.FileUpload} object * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, InputStream data, long contentLength) { return addFilePart(new InputStreamPart(name, filename, data, contentLength)); }
/** * Add a InputStream 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 An {@link InputStream} data value representing the content of file object * @param contentLength The size of the content to pass to {@link HttpDataFactory} in order to create * {@link io.netty.handler.codec.http.multipart.FileUpload} object * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, InputStream data, long contentLength) { return addFilePart(new InputStreamPart(name, filename, contentType, data, contentLength)); }
/** * Add a InputStream 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 An {@link InputStream} data value representing the content of file object * @param contentLength The size of the content to pass to {@link HttpDataFactory} in order to create * {@link io.netty.handler.codec.http.multipart.FileUpload} object * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, InputStream data, long contentLength) { return addFilePart(new InputStreamPart(name, filename, data, contentLength)); }
/** * Add a InputStream 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 An {@link InputStream} data value representing the content of file object * @param contentLength The size of the content to pass to {@link HttpDataFactory} in order to create * {@link io.netty.handler.codec.http.multipart.FileUpload} object * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, InputStream data, long contentLength) { return addFilePart(new InputStreamPart(name, filename, contentType, data, contentLength)); }