Class HttpServerFileUpload
- java.lang.Object
-
- io.vertx.mutiny.core.http.HttpServerFileUpload
-
- All Implemented Interfaces:
ReadStream<Buffer>,StreamBase
public class HttpServerFileUpload extends Object implements ReadStream<Buffer>
Represents an file upload from an HTML FORM. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<HttpServerFileUpload>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description HttpServerFileUpload(io.vertx.core.http.HttpServerFileUpload delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcharset()StringcontentTransferEncoding()StringcontentType()HttpServerFileUploadendHandler(Consumer<Void> endHandler)booleanequals(Object o)HttpServerFileUploadexceptionHandler(Consumer<Throwable> handler)HttpServerFileUploadfetch(long amount)AsyncFilefile()Stringfilename()io.vertx.core.http.HttpServerFileUploadgetDelegate()HttpServerFileUploadhandler(Consumer<Buffer> handler)inthashCode()booleanisSizeAvailable()Stringname()static HttpServerFileUploadnewInstance(io.vertx.core.http.HttpServerFileUpload arg)HttpServerFileUploadpause()Pipe<Buffer>pipe()io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<Buffer> dst)Pipe thisReadStreamto theWriteStream.VoidpipeToAndAwait(WriteStream<Buffer> dst)Blocking variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream.) voidpipeToAndForget(WriteStream<Buffer> dst)Variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStreamthat ignores the result of the operation.) HttpServerFileUploadresume()longsize()HttpServerFileUploadstreamToFileSystem(String filename)Iterable<Buffer>toBlockingIterable()Stream<Buffer>toBlockingStream()io.smallrye.mutiny.Multi<Buffer>toMulti()StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<HttpServerFileUpload> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public io.vertx.core.http.HttpServerFileUpload getDelegate()
- Specified by:
getDelegatein interfaceReadStream<Buffer>- Specified by:
getDelegatein interfaceStreamBase
-
pipe
public Pipe<Buffer> pipe()
- Specified by:
pipein interfaceReadStream<Buffer>- Returns:
- a pipe
-
pipeTo
public io.smallrye.mutiny.Uni<Void> pipeTo(WriteStream<Buffer> dst)
Pipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handlerwill be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeToin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
public Void pipeToAndAwait(WriteStream<Buffer> dst)
Blocking variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream.) This method waits 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).
- Specified by:
pipeToAndAwaitin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream- Returns:
- the Void instance produced by the operation
-
exceptionHandler
public HttpServerFileUpload exceptionHandler(Consumer<Throwable> handler)
- Specified by:
exceptionHandlerin interfaceReadStream<Buffer>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler- the exception handler- Returns:
- a reference to this, so the API can be used fluently
-
handler
public HttpServerFileUpload handler(Consumer<Buffer> handler)
- Specified by:
handlerin interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
public HttpServerFileUpload endHandler(Consumer<Void> endHandler)
- Specified by:
endHandlerin interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
pause
public HttpServerFileUpload pause()
- Specified by:
pausein interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
resume
public HttpServerFileUpload resume()
- Specified by:
resumein interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
public HttpServerFileUpload fetch(long amount)
- Specified by:
fetchin interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
streamToFileSystem
public HttpServerFileUpload streamToFileSystem(String filename)
- Parameters:
filename- the name of the file- Returns:
-
filename
public String filename()
- Returns:
- the filename which was used when upload the file.
-
name
public String name()
- Returns:
- the name of the attribute
-
contentType
public String contentType()
- Returns:
- the content type for the upload
-
contentTransferEncoding
public String contentTransferEncoding()
- Returns:
- the contentTransferEncoding for the upload
-
charset
public String charset()
- Returns:
- the charset for the upload
-
size
public long size()
- Returns:
- the size of the upload (in bytes)
-
isSizeAvailable
public boolean isSizeAvailable()
- Returns:
trueif the size of the upload can be retrieved viasize().
-
file
public AsyncFile file()
- Returns:
- the async uploaded file when
streamToFileSystem(java.lang.String)has been used
-
pipeToAndForget
public void pipeToAndForget(WriteStream<Buffer> dst)
Variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStreamthat ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStreambut you don't need to compose it with other operations.) - Parameters:
dst-
-
toMulti
public io.smallrye.mutiny.Multi<Buffer> toMulti()
- Specified by:
toMultiin interfaceReadStream<Buffer>
-
newInstance
public static HttpServerFileUpload newInstance(io.vertx.core.http.HttpServerFileUpload arg)
-
-