Class: Vertx::HttpServerFileUpload
- Inherits:
-
Object
- Object
- Vertx::HttpServerFileUpload
show all
- Includes:
- ReadStream
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb
Overview
Represents an file upload from an HTML FORM.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Class Method Details
+ (Boolean) accept?(obj)
20
21
22
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 20
def @@j_api_type.accept?(obj)
obj.class == HttpServerFileUpload
end
|
+ (Object) j_api_type
29
30
31
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 29
def self.j_api_type
@@j_api_type
end
|
+ (Object) j_class
32
33
34
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 32
def self.j_class
Java::IoVertxCoreHttp::HttpServerFileUpload.java_class
end
|
+ (Object) unwrap(obj)
26
27
28
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 26
def @@j_api_type.unwrap(obj)
obj.j_del
end
|
+ (Object) wrap(obj)
23
24
25
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 23
def @@j_api_type.wrap(obj)
HttpServerFileUpload.new(obj)
end
|
Instance Method Details
- (String) charset
Returns the charset for the upload
126
127
128
129
130
131
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 126
def charset
if !block_given?
return @j_del.java_method(:charset, []).call()
end
raise ArgumentError, "Invalid arguments when calling charset()"
end
|
- (String) content_transfer_encoding
Returns the contentTransferEncoding for the upload
119
120
121
122
123
124
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 119
def content_transfer_encoding
if !block_given?
return @j_del.java_method(:contentTransferEncoding, []).call()
end
raise ArgumentError, "Invalid arguments when calling content_transfer_encoding()"
end
|
- (String) content_type
Returns the content type for the upload
112
113
114
115
116
117
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 112
def content_type
if !block_given?
return @j_del.java_method(:contentType, []).call()
end
raise ArgumentError, "Invalid arguments when calling content_type()"
end
|
- (self) end_handler { ... }
55
56
57
58
59
60
61
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 55
def end_handler
if block_given?
@j_del.java_method(:endHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
return self
end
raise ArgumentError, "Invalid arguments when calling end_handler()"
end
|
- (self) exception_handler { ... }
37
38
39
40
41
42
43
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 37
def exception_handler
if block_given?
@j_del.java_method(:exceptionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.from_throwable(event)) }))
return self
end
raise ArgumentError, "Invalid arguments when calling exception_handler()"
end
|
- (self) fetch(amount = nil)
80
81
82
83
84
85
86
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 80
def fetch(amount=nil)
if amount.class == Fixnum && !block_given?
@j_del.java_method(:fetch, [Java::long.java_class]).call(amount)
return self
end
raise ArgumentError, "Invalid arguments when calling fetch(#{amount})"
end
|
- (String) filename
Returns the filename which was used when upload the file.
98
99
100
101
102
103
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 98
def filename
if !block_given?
return @j_del.java_method(:filename, []).call()
end
raise ArgumentError, "Invalid arguments when calling filename()"
end
|
- (self) handler { ... }
46
47
48
49
50
51
52
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 46
def handler
if block_given?
@j_del.java_method(:handler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::Buffer)) }))
return self
end
raise ArgumentError, "Invalid arguments when calling handler()"
end
|
- (String) name
Returns the name of the attribute
105
106
107
108
109
110
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 105
def name
if !block_given?
return @j_del.java_method(:name, []).call()
end
raise ArgumentError, "Invalid arguments when calling name()"
end
|
- (self) pause
63
64
65
66
67
68
69
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 63
def pause
if !block_given?
@j_del.java_method(:pause, []).call()
return self
end
raise ArgumentError, "Invalid arguments when calling pause()"
end
|
- (self) resume
71
72
73
74
75
76
77
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 71
def resume
if !block_given?
@j_del.java_method(:resume, []).call()
return self
end
raise ArgumentError, "Invalid arguments when calling resume()"
end
|
- (Fixnum) size
The size of the upload may not be available until it is all read.
Check #is_size_available to determine this
135
136
137
138
139
140
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 135
def size
if !block_given?
return @j_del.java_method(:size, []).call()
end
raise ArgumentError, "Invalid arguments when calling size()"
end
|
- (true, false) size_available?
Returns true if the size of the upload can be retrieved via
#size.
142
143
144
145
146
147
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 142
def size_available?
if !block_given?
return @j_del.java_method(:isSizeAvailable, []).call()
end
raise ArgumentError, "Invalid arguments when calling size_available?()"
end
|
- (self) stream_to_file_system(filename = nil)
Stream the content of this upload to the given file on storage.
90
91
92
93
94
95
96
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/http_server_file_upload.rb', line 90
def stream_to_file_system(filename=nil)
if filename.class == String && !block_given?
@j_del.java_method(:streamToFileSystem, [Java::java.lang.String.java_class]).call(filename)
return self
end
raise ArgumentError, "Invalid arguments when calling stream_to_file_system(#{filename})"
end
|