public interface HttpServerFileUpload extends ReadStream<Buffer>
Represents an upload from an HTML form.<p>
Modifier and Type | Method and Description |
---|---|
String |
charset()
Returns the charset for the upload
|
String |
contentTransferEncoding()
Returns the contentTransferEncoding for the upload
|
String |
contentType()
Returns the contentType for the upload
|
HttpServerFileUpload |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
HttpServerFileUpload |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler.
|
String |
filename()
Returns the filename which was used when upload the file.
|
HttpServerFileUpload |
handler(Handler<Buffer> handler)
Set a data handler.
|
boolean |
isSizeAvailable()
Returns
true if the size of the upload can be retrieved via size() . |
String |
name()
Returns the name of the attribute
|
HttpServerFileUpload |
pause()
Pause the
ReadSupport . |
HttpServerFileUpload |
resume()
Resume reading.
|
long |
size()
Returns the size of the upload (in bytes)
|
HttpServerFileUpload |
streamToFileSystem(String filename)
Stream the content of this upload to the given filename.
|
HttpServerFileUpload exceptionHandler(Handler<Throwable> handler)
StreamBase
Set an exception handler.
exceptionHandler
in interface ReadStream<Buffer>
exceptionHandler
in interface StreamBase
HttpServerFileUpload handler(Handler<Buffer> handler)
ReadStream
Set a data handler. As data is read, the handler will be called with the data.
handler
in interface ReadStream<Buffer>
HttpServerFileUpload endHandler(Handler<Void> endHandler)
ReadStream
Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
endHandler
in interface ReadStream<Buffer>
HttpServerFileUpload pause()
ReadStream
Pause the ReadSupport
. While it’s paused, no data will be sent to the dataHandler
pause
in interface ReadStream<Buffer>
HttpServerFileUpload resume()
ReadStream
Resume reading. If the ReadSupport
has been paused, reading will recommence on it.
resume
in interface ReadStream<Buffer>
HttpServerFileUpload streamToFileSystem(String filename)
Stream the content of this upload to the given filename.
String filename()
Returns the filename which was used when upload the file.
String name()
Returns the name of the attribute
String contentType()
Returns the contentType for the upload
String contentTransferEncoding()
Returns the contentTransferEncoding for the upload
String charset()
Returns the charset for the upload
long size()
Returns the size of the upload (in bytes)
boolean isSizeAvailable()
Returns true
if the size of the upload can be retrieved via size()
.
Copyright © 2014. All Rights Reserved.