public class HttpServerFileUpload extends Object implements ReadStream<Buffer>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<HttpServerFileUpload> |
__TYPE_ARG |
Constructor and Description |
---|
HttpServerFileUpload(HttpServerFileUpload delegate) |
HttpServerFileUpload(Object delegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancelStreamToFileSystem()
Try to cancel the file system streaming, the streamed file will be deleted.
|
String |
charset() |
String |
contentTransferEncoding() |
String |
contentType() |
HttpServerFileUpload |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
boolean |
equals(Object o) |
HttpServerFileUpload |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
HttpServerFileUpload |
fetch(long amount)
Fetch the specified
amount of elements. |
AsyncFile |
file() |
String |
filename() |
HttpServerFileUpload |
getDelegate() |
HttpServerFileUpload |
handler(Handler<Buffer> handler)
Set a data handler.
|
int |
hashCode() |
boolean |
isSizeAvailable() |
String |
name() |
static HttpServerFileUpload |
newInstance(HttpServerFileUpload arg) |
HttpServerFileUpload |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
Pipe<Buffer> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
Completable |
pipeTo(WriteStream<Buffer> dst)
Pipe this
ReadStream to the WriteStream . |
HttpServerFileUpload |
resume()
Resume reading, and sets the buffer in
flowing mode. |
Completable |
rxPipeTo(WriteStream<Buffer> dst)
Pipe this
ReadStream to the WriteStream . |
Completable |
rxStreamToFileSystem(String filename)
Stream the content of this upload to the given file on storage.
|
long |
size()
The size of the upload may not be available until it is all read.
|
Completable |
streamToFileSystem(String filename)
Stream the content of this upload to the given file on storage.
|
Flowable<Buffer> |
toFlowable() |
Observable<Buffer> |
toObservable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public static final io.vertx.lang.rx.TypeArg<HttpServerFileUpload> __TYPE_ARG
public HttpServerFileUpload(HttpServerFileUpload delegate)
public HttpServerFileUpload(Object delegate)
public HttpServerFileUpload getDelegate()
getDelegate
in interface ReadStream<Buffer>
getDelegate
in interface StreamBase
public Observable<Buffer> toObservable()
toObservable
in interface ReadStream<Buffer>
public Flowable<Buffer> toFlowable()
toFlowable
in interface ReadStream<Buffer>
public Pipe<Buffer> pipe()
WriteStream
.pipe
in interface ReadStream<Buffer>
public Completable pipeTo(WriteStream<Buffer> dst)
ReadStream
to the WriteStream
.
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 handler
will be
called with the result.
pipeTo
in interface ReadStream<Buffer>
dst
- the destination write streampublic Completable rxPipeTo(WriteStream<Buffer> dst)
ReadStream
to the WriteStream
.
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 handler
will be
called with the result.
rxPipeTo
in interface ReadStream<Buffer>
dst
- the destination write streampublic HttpServerFileUpload exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<Buffer>
exceptionHandler
in interface StreamBase
handler
- the exception handlerpublic HttpServerFileUpload handler(Handler<Buffer> handler)
ReadStream
handler
in interface ReadStream<Buffer>
public HttpServerFileUpload endHandler(Handler<Void> endHandler)
ReadStream
endHandler
in interface ReadStream<Buffer>
public HttpServerFileUpload pause()
ReadStream
ReadStream
, it sets the buffer in fetch
mode and clears the actual demand.
While it's paused, no data will be sent to the data handler
.
pause
in interface ReadStream<Buffer>
public HttpServerFileUpload resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<Buffer>
public HttpServerFileUpload fetch(long amount)
ReadStream
amount
of elements. If the ReadStream
has been paused, reading will
recommence with the specified amount
of items, otherwise the specified amount
will
be added to the current stream demand.fetch
in interface ReadStream<Buffer>
public Completable streamToFileSystem(String filename)
filename
- the name of the filepublic Completable rxStreamToFileSystem(String filename)
filename
- the name of the filepublic boolean cancelStreamToFileSystem()
true
when the stream is cancelled, otherwise it means that stream is finishedpublic String filename()
public String name()
public String contentType()
public String contentTransferEncoding()
public String charset()
public long size()
isSizeAvailable()
to determine thispublic boolean isSizeAvailable()
true
if the size of the upload can be retrieved via size()
.public AsyncFile file()
streamToFileSystem(java.lang.String)
has been used and the file is availablepublic static HttpServerFileUpload newInstance(HttpServerFileUpload arg)
Copyright © 2024 Eclipse. All rights reserved.