/** * 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 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 a file object 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 File content of type {@link MediaType}, possible values could be "text/plain", "application/json" etc * @param file The file object to copy the content to {@link io.micronaut.http.multipart.FileUpload} * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, File file) { return addFilePart(new FilePart(name, filename, contentType, file)); }
/** * 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 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 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 a file object to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param file The file object to copy the content to {@link io.micronaut.http.multipart.FileUpload} * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, File file) { return addFilePart(new FilePart(name, filename, file)); }
/** * Add a file object 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 File content of type {@link MediaType}, possible values could be "text/plain", "application/json" etc * @param file The file object to copy the content to {@link io.micronaut.http.multipart.FileUpload} * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, File file) { return addFilePart(new FilePart(name, filename, contentType, file)); }
/** * 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 a file object to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param file The file object to copy the content to {@link io.micronaut.http.multipart.FileUpload} * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, File file) { return addFilePart(new FilePart(name, filename, file)); }
/** * 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 file object 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 File content of type {@link MediaType}, possible values could be "text/plain", "application/json" etc * @param file The file object to copy the content to {@link io.micronaut.http.multipart.FileUpload} * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, MediaType contentType, File file) { return addFilePart(new FilePart(name, filename, contentType, file)); }
/** * 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 a file object to MultipartBody. * * @param name Name of the parameter for file object to be passed in multipart request * @param filename Name of the file * @param file The file object to copy the content to {@link io.micronaut.http.multipart.FileUpload} * @return A {@link MultipartBody.Builder} to build MultipartBody */ public Builder addPart(String name, String filename, File file) { return addFilePart(new FilePart(name, filename, file)); }