Class FileUpload

java.lang.Object
io.vertx.mutiny.ext.web.FileUpload
All Implemented Interfaces:
MutinyDelegate

public class FileUpload extends Object implements MutinyDelegate
Represents a file-upload from an HTTP multipart form submission.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Tim Fox
See Also:
  • FileUpload
  • Field Details

  • Constructor Details

    • FileUpload

      public FileUpload(io.vertx.ext.web.FileUpload delegate)
      Create a new instance of FileUpload delegating to the given (non-null) instance of FileUpload.
    • FileUpload

      public FileUpload(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.FileUpload getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • delete

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> delete()
      Delete the uploaded file on the disk.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • FileUpload.delete()
    • deleteAndAwait

      public void deleteAndAwait()
      Delete the uploaded file on the disk.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      See Also:
      • FileUpload.delete()
    • deleteAndForget

      public FileUpload deleteAndForget()
      Delete the uploaded file on the disk.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • FileUpload.delete()
    • name

      public String name()
      Returns:
      the name of the upload as provided in the form submission
    • uploadedFileName

      public String uploadedFileName()
      Returns:
      the actual temporary file name on the server where the file was uploaded to.
    • fileName

      public String fileName()
      Returns:
      the file name of the upload as provided in the form submission
    • size

      public long size()
      Returns:
      the size of the upload, in bytes
    • contentType

      public String contentType()
      Returns:
      the content type (MIME type) of the upload
    • contentTransferEncoding

      public String contentTransferEncoding()
      Returns:
      the content transfer encoding of the upload - this describes how the upload was encoded in the form submission.
    • charSet

      public String charSet()
      Returns:
      the charset of the upload
    • cancel

      public boolean cancel()
      Try to cancel the file upload.
      Returns:
      true when the upload was cancelled, false when the upload is finished and the file is available
    • newInstance

      public static FileUpload newInstance(io.vertx.ext.web.FileUpload delegate)
      Creates a new instance of the FileUpload.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object