Class: Vertx::Buffer
- Inherits:
-
Object
- Object
- Vertx::Buffer
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb
Overview
A buffer is a sequence of zero or more bytes that can read from or written to and which expands automatically as necessary to accommodate any bytes written to it. You can perhaps think of a buffer as smart byte array.
Please consult the documentation for more information on buffers.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::Vertx::Buffer) buffer(*args)
Create a new buffer from a string and using the specified encoding.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (self) append_buffer(*args)
Appends the specified Buffer starting at the offset using len to the end of this Buffer.
-
- (self) appendByte(b)
Appends the specified byte to the end of the Buffer.
-
- (self) appendDouble(d)
Appends the specified double to the end of the Buffer.
-
- (self) appendFloat(f)
Appends the specified float to the end of the Buffer.
-
- (self) appendInt(i)
Appends the specified int to the end of the Buffer.
-
- (self) appendIntLE(i)
Appends the specified int to the end of the Buffer in the Little Endian Byte Order.
-
- (self) appendLong(l)
Appends the specified long to the end of the Buffer.
-
- (self) appendLongLE(l)
Appends the specified long to the end of the Buffer in the Little Endian Byte Order.
-
- (self) appendMedium(i)
Appends the specified 24bit int to the end of the Buffer.
-
- (self) appendMediumLE(i)
Appends the specified 24bit int to the end of the Buffer in the Little Endian Byte Order.
-
- (self) appendShort(s)
Appends the specified short to the end of the Buffer.The buffer will expand as necessary to accommodate any bytes written.
-
- (self) appendShortLE(s)
Appends the specified short to the end of the Buffer in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any bytes written.
-
- (self) append_string(*args)
Appends the specified String to the end of the Buffer with the encoding as specified by enc.
-
- (self) appendUnsignedByte(b)
Appends the specified unsigned byte to the end of the Buffer.
-
- (self) appendUnsignedInt(i)
Appends the specified unsigned int to the end of the Buffer.
-
- (self) appendUnsignedIntLE(i)
Appends the specified unsigned int to the end of the Buffer in the Little Endian Byte Order.
-
- (self) appendUnsignedShort(s)
Appends the specified unsigned short to the end of the Buffer.The buffer will expand as necessary to accommodate any bytes written.
-
- (self) appendUnsignedShortLE(s)
Appends the specified unsigned short to the end of the Buffer in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any bytes written.
-
- (::Vertx::Buffer) copy
Returns a copy of the entire Buffer.
-
- (::Vertx::Buffer) getBuffer(start, end)
Returns a copy of a sub-sequence the Buffer as a Buffer starting at position start and ending at position end - 1.
-
- (Fixnum) getByte(pos)
Returns the byte at position pos in the Buffer.
-
- (Float) getDouble(pos)
Returns the double at position pos in the Buffer.
-
- (Float) getFloat(pos)
Returns the float at position pos in the Buffer.
-
- (Fixnum) getInt(pos)
Returns the int at position pos in the Buffer.
-
- (Fixnum) getIntLE(pos)
Gets a 32-bit integer at the specified absolute index in this buffer with Little Endian Byte Order.
-
- (Fixnum) getLong(pos)
Returns the long at position pos in the Buffer.
-
- (Fixnum) getLongLE(pos)
Gets a 64-bit long integer at the specified absolute index in this buffer in Little Endian Byte Order.
-
- (Fixnum) getMedium(pos)
Gets a 24-bit medium integer at the specified absolute index in this buffer.
-
- (Fixnum) getMediumLE(pos)
Gets a 24-bit medium integer at the specified absolute index in this buffer in the Little Endian Byte Order.
-
- (Fixnum) getShort(pos)
Returns the short at position pos in the Buffer.
-
- (Fixnum) getShortLE(pos)
Gets a 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.
-
- (String) get_string(*args)
Returns a copy of a sub-sequence the Buffer as a String starting at position start and ending at position end - 1 interpreted as a String in the specified encoding.
-
- (Fixnum) getUnsignedByte(pos)
Returns the unsigned byte at position pos in the Buffer, as a short.
-
- (Fixnum) getUnsignedInt(pos)
Returns the unsigned int at position pos in the Buffer, as a long.
-
- (Fixnum) getUnsignedIntLE(pos)
Returns the unsigned int at position pos in the Buffer, as a long in Little Endian Byte Order.
-
- (Fixnum) getUnsignedMedium(pos)
Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer.
-
- (Fixnum) getUnsignedMediumLE(pos)
Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer in Little Endian Byte Order.
-
- (Fixnum) getUnsignedShort(pos)
Returns the unsigned short at position pos in the Buffer, as an int.
-
- (Fixnum) getUnsignedShortLE(pos)
Gets an unsigned 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.
-
- (Fixnum) length
Returns the length of the buffer, measured in bytes.
-
- (self) set_buffer(*args)
Sets the bytes at position pos in the Buffer to the bytes represented by the Buffer b on the given offset and len.
-
- (self) setByte(pos, b)
Sets the byte at position pos in the Buffer to the value b.
-
- (self) setDouble(pos, d)
Sets the double at position pos in the Buffer to the value d.
-
- (self) setFloat(pos, f)
Sets the float at position pos in the Buffer to the value f.
-
- (self) setInt(pos, i)
Sets the int at position pos in the Buffer to the value i.
-
- (self) setIntLE(pos, i)
Sets the int at position pos in the Buffer to the value i in the Little Endian Byte Order.
-
- (self) setLong(pos, l)
Sets the long at position pos in the Buffer to the value l.
-
- (self) setLongLE(pos, l)
Sets the long at position pos in the Buffer to the value l in the Little Endian Byte Order.
-
- (self) setMedium(pos, i)
Sets the 24bit int at position pos in the Buffer to the value i.
-
- (self) setMediumLE(pos, i)
Sets the 24bit int at position pos in the Buffer to the value i.
-
- (self) setShort(pos, s)
Sets the short at position pos in the Buffer to the value s.
-
- (self) setShortLE(pos, s)
Sets the short at position pos in the Buffer to the value s in the Little Endian Byte Order.
-
- (self) set_string(*args)
Sets the bytes at position pos in the Buffer to the value of str encoded in encoding enc.
-
- (self) setUnsignedByte(pos, b)
Sets the unsigned byte at position pos in the Buffer to the value b.
-
- (self) setUnsignedInt(pos, i)
Sets the unsigned int at position pos in the Buffer to the value i.
-
- (self) setUnsignedIntLE(pos, i)
Sets the unsigned int at position pos in the Buffer to the value i in the Little Endian Byte Order.
-
- (self) setUnsignedShort(pos, s)
Sets the unsigned short at position pos in the Buffer to the value s.
-
- (self) setUnsignedShortLE(pos, s)
Sets the unsigned short at position pos in the Buffer to the value s in the Little Endian Byte Order.
-
- (::Vertx::Buffer) slice(*args)
Returns a slice of this buffer.
-
- (Object) toJson
Returns a Json representation of the Buffer.
-
- (Array<String,Object>) toJsonArray
Returns a Json array representation of the Buffer.
-
- (Hash{String => Object}) toJsonObject
Returns a Json object representation of the Buffer.
-
- (String) to_string(*args)
Returns a String representation of the Buffer with the encoding specified by enc.
Class Method Details
+ (Boolean) accept?(obj)
23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 23 def @@j_api_type.accept?(obj) obj.class == Buffer end |
+ (::Vertx::Buffer) buffer + (::Vertx::Buffer) buffer(initialSizeHint) + (::Vertx::Buffer) buffer(string) + (::Vertx::Buffer) buffer(string, enc)
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 285 def self.buffer(*args) if !block_given? && args[0] == nil && args[1] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreBuffer::Buffer.java_method(:buffer, []).call(),::Vertx::Buffer) elsif args[0].class == Fixnum && !block_given? && args[1] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreBuffer::Buffer.java_method(:buffer, [Java::int.java_class]).call(args[0]),::Vertx::Buffer) elsif args[0].class == String && !block_given? && args[1] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreBuffer::Buffer.java_method(:buffer, [Java::java.lang.String.java_class]).call(args[0]),::Vertx::Buffer) elsif args[0].class == String && args[1].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreBuffer::Buffer.java_method(:buffer, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1]),::Vertx::Buffer) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling buffer(#{args[0]},#{args[1]})" end end |
+ (Object) j_api_type
32 33 34 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 32 def self.j_api_type @@j_api_type end |
+ (Object) j_class
35 36 37 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 35 def self.j_class Java::IoVertxCoreBuffer::Buffer.java_class end |
+ (Object) unwrap(obj)
29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 29 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
26 27 28 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 26 def @@j_api_type.wrap(obj) Buffer.new(obj) end |
Instance Method Details
- (self) appendBuffer(buff) - (self) appendBuffer(buff, offset, len)
Buffer
starting at the offset
using len
to the end of this Buffer. The buffer will expand as necessary to accommodate
any bytes written.
Returns a reference to this
so multiple operations can be appended together.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 145 def append_buffer(*args) if args[0].class.method_defined?(:j_del) && !block_given? && args[1] == nil && args[2] == nil @j_del.java_method(:appendBuffer, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(args[0].j_del) return self elsif args[0].class.method_defined?(:j_del) && args[1].class == Fixnum && args[2].class == Fixnum && !block_given? @j_del.java_method(:appendBuffer, [Java::IoVertxCoreBuffer::Buffer.java_class,Java::int.java_class,Java::int.java_class]).call(args[0].j_del,args[1],args[2]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_buffer(#{args[0]},#{args[1]},#{args[2]})" end end |
- (self) appendByte(b)
byte
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
417 418 419 420 421 422 423 424 425 426 427 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 417 def append_byte(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendByte, [Java::byte.java_class]).call(::Vertx::Util::Utils.to_byte(args[0])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_byte(#{args[0]})" end end |
- (self) appendDouble(d)
double
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
43 44 45 46 47 48 49 50 51 52 53 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 43 def append_double(*args) if args[0].class == Float && !block_given? @j_del.java_method(:appendDouble, [Java::double.java_class]).call(::Vertx::Util::Utils.to_double(args[0])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_double(#{args[0]})" end end |
- (self) appendFloat(f)
float
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
718 719 720 721 722 723 724 725 726 727 728 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 718 def append_float(*args) if args[0].class == Float && !block_given? @j_del.java_method(:appendFloat, [Java::float.java_class]).call(::Vertx::Util::Utils.to_float(args[0])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_float(#{args[0]})" end end |
- (self) appendInt(i)
int
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
518 519 520 521 522 523 524 525 526 527 528 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 518 def append_int(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendInt, [Java::int.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_int(#{args[0]})" end end |
- (self) appendIntLE(i)
int
to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
993 994 995 996 997 998 999 1000 1001 1002 1003 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 993 def append_int_le(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendIntLE, [Java::int.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_int_le(#{args[0]})" end end |
- (self) appendLong(l)
long
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
592 593 594 595 596 597 598 599 600 601 602 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 592 def append_long(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendLong, [Java::long.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_long(#{args[0]})" end end |
- (self) appendLongLE(l)
long
to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
59 60 61 62 63 64 65 66 67 68 69 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 59 def append_long_le(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendLongLE, [Java::long.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_long_le(#{args[0]})" end end |
- (self) appendMedium(i)
int
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 1054 def append_medium(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendMedium, [Java::int.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_medium(#{args[0]})" end end |
- (self) appendMediumLE(i)
int
to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
343 344 345 346 347 348 349 350 351 352 353 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 343 def append_medium_le(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendMediumLE, [Java::int.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_medium_le(#{args[0]})" end end |
- (self) appendShort(s)
short
to the end of the Buffer.The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
867 868 869 870 871 872 873 874 875 876 877 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 867 def append_short(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendShort, [Java::short.java_class]).call(::Vertx::Util::Utils.to_short(args[0])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_short(#{args[0]})" end end |
- (self) appendShortLE(s)
short
to the end of the Buffer in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
672 673 674 675 676 677 678 679 680 681 682 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 672 def append_short_le(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendShortLE, [Java::short.java_class]).call(::Vertx::Util::Utils.to_short(args[0])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_short_le(#{args[0]})" end end |
- (self) appendString(str) - (self) appendString(str, enc)
String
to the end of the Buffer with the encoding as specified by enc
.The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 324 def append_string(*args) if args[0].class == String && !block_given? && args[1] == nil @j_del.java_method(:appendString, [Java::java.lang.String.java_class]).call(args[0]) return self elsif args[0].class == String && args[1].class == String && !block_given? @j_del.java_method(:appendString, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_string(#{args[0]},#{args[1]})" end end |
- (self) appendUnsignedByte(b)
byte
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
215 216 217 218 219 220 221 222 223 224 225 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 215 def append_unsigned_byte(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendUnsignedByte, [Java::short.java_class]).call(::Vertx::Util::Utils.to_short(args[0])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_unsigned_byte(#{args[0]})" end end |
- (self) appendUnsignedInt(i)
int
to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
688 689 690 691 692 693 694 695 696 697 698 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 688 def append_unsigned_int(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendUnsignedInt, [Java::long.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_unsigned_int(#{args[0]})" end end |
- (self) appendUnsignedIntLE(i)
int
to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
812 813 814 815 816 817 818 819 820 821 822 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 812 def append_unsigned_int_le(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendUnsignedIntLE, [Java::long.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_unsigned_int_le(#{args[0]})" end end |
- (self) appendUnsignedShort(s)
short
to the end of the Buffer.The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
963 964 965 966 967 968 969 970 971 972 973 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 963 def append_unsigned_short(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendUnsignedShort, [Java::int.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_unsigned_short(#{args[0]})" end end |
- (self) appendUnsignedShortLE(s)
short
to the end of the Buffer in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any bytes written.
Returns a reference to this
so multiple operations can be appended together.
947 948 949 950 951 952 953 954 955 956 957 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 947 def append_unsigned_short_le(*args) if args[0].class == Fixnum && !block_given? @j_del.java_method(:appendUnsignedShortLE, [Java::int.java_class]).call(args[0]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_unsigned_short_le(#{args[0]})" end end |
- (::Vertx::Buffer) copy
746 747 748 749 750 751 752 753 754 755 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 746 def copy if !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:copy, []).call(),::Vertx::Buffer) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling copy()" end end |
- (::Vertx::Buffer) getBuffer(start, end)
start
and ending at position end - 1
626 627 628 629 630 631 632 633 634 635 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 626 def get_buffer(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getBuffer, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]),::Vertx::Buffer) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_buffer(#{args[0]},#{args[1]})" end end |
- (Fixnum) getByte(pos)
byte
at position pos
in the Buffer.
91 92 93 94 95 96 97 98 99 100 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 91 def get_byte(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getByte, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_byte(#{args[0]})" end end |
- (Float) getDouble(pos)
double
at position pos
in the Buffer.
657 658 659 660 661 662 663 664 665 666 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 657 def get_double(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getDouble, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_double(#{args[0]})" end end |
- (Float) getFloat(pos)
float
at position pos
in the Buffer.
703 704 705 706 707 708 709 710 711 712 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 703 def get_float(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getFloat, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_float(#{args[0]})" end end |
- (Fixnum) getInt(pos)
int
at position pos
in the Buffer.
432 433 434 435 436 437 438 439 440 441 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 432 def get_int(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getInt, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_int(#{args[0]})" end end |
- (Fixnum) getIntLE(pos)
index
in this buffer with Little Endian Byte Order.
918 919 920 921 922 923 924 925 926 927 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 918 def get_int_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getIntLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_int_le(#{args[0]})" end end |
- (Fixnum) getLong(pos)
long
at position pos
in the Buffer.
978 979 980 981 982 983 984 985 986 987 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 978 def get_long(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getLong, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_long(#{args[0]})" end end |
- (Fixnum) getLongLE(pos)
index
in this buffer in Little Endian Byte Order.
733 734 735 736 737 738 739 740 741 742 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 733 def get_long_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getLongLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_long_le(#{args[0]})" end end |
- (Fixnum) getMedium(pos)
index
in this buffer.
560 561 562 563 564 565 566 567 568 569 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 560 def get_medium(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getMedium, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_medium(#{args[0]})" end end |
- (Fixnum) getMediumLE(pos)
index
in this buffer in the Little Endian Byte Order.
264 265 266 267 268 269 270 271 272 273 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 264 def get_medium_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getMediumLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_medium_le(#{args[0]})" end end |
- (Fixnum) getShort(pos)
short
at position pos
in the Buffer.
852 853 854 855 856 857 858 859 860 861 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 852 def get_short(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getShort, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_short(#{args[0]})" end end |
- (Fixnum) getShortLE(pos)
index
in this buffer in Little Endian Byte Order.
546 547 548 549 550 551 552 553 554 555 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 546 def get_short_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getShortLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_short_le(#{args[0]})" end end |
- (String) getString(start, end) - (String) getString(start, end)
String
starting at position start
and ending at position end - 1
interpreted as a String in the specified encoding
902 903 904 905 906 907 908 909 910 911 912 913 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 902 def get_string(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? && args[2] == nil return @j_del.java_method(:getString, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) elsif args[0].class == Fixnum && args[1].class == Fixnum && args[2].class == String && !block_given? return @j_del.java_method(:getString, [Java::int.java_class,Java::int.java_class,Java::java.lang.String.java_class]).call(args[0],args[1],args[2]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_string(#{args[0]},#{args[1]},#{args[2]})" end end |
- (Fixnum) getUnsignedByte(pos)
byte
at position pos
in the Buffer, as a short
.
932 933 934 935 936 937 938 939 940 941 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 932 def get_unsigned_byte(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedByte, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_byte(#{args[0]})" end end |
- (Fixnum) getUnsignedInt(pos)
int
at position pos
in the Buffer, as a long
.
305 306 307 308 309 310 311 312 313 314 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 305 def get_unsigned_int(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedInt, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_int(#{args[0]})" end end |
- (Fixnum) getUnsignedIntLE(pos)
int
at position pos
in the Buffer, as a long
in Little Endian Byte Order.
230 231 232 233 234 235 236 237 238 239 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 230 def get_unsigned_int_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedIntLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_int_le(#{args[0]})" end end |
- (Fixnum) getUnsignedMedium(pos)
index
in this buffer.
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 1022 def get_unsigned_medium(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedMedium, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_medium(#{args[0]})" end end |
- (Fixnum) getUnsignedMediumLE(pos)
index
in this buffer in Little Endian Byte Order.
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 1008 def get_unsigned_medium_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedMediumLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_medium_le(#{args[0]})" end end |
- (Fixnum) getUnsignedShort(pos)
short
at position pos
in the Buffer, as an int
.
358 359 360 361 362 363 364 365 366 367 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 358 def get_unsigned_short(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedShort, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_short(#{args[0]})" end end |
- (Fixnum) getUnsignedShortLE(pos)
index
in this buffer in Little Endian Byte Order.
402 403 404 405 406 407 408 409 410 411 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 402 def get_unsigned_short_le(*args) if args[0].class == Fixnum && !block_given? return @j_del.java_method(:getUnsignedShortLE, [Java::int.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_unsigned_short_le(#{args[0]})" end end |
- (Fixnum) length
882 883 884 885 886 887 888 889 890 891 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 882 def length if !block_given? return @j_del.java_method(:length, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling length()" end end |
- (self) setBuffer(pos, b) - (self) setBuffer(pos, b, offset, len)
pos
in the Buffer to the bytes represented by the Buffer b
on the given offset
and len
.The buffer will expand as necessary to accommodate any value written.
834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 834 def set_buffer(*args) if args[0].class == Fixnum && args[1].class.method_defined?(:j_del) && !block_given? && args[2] == nil && args[3] == nil @j_del.java_method(:setBuffer, [Java::int.java_class,Java::IoVertxCoreBuffer::Buffer.java_class]).call(args[0],args[1].j_del) return self elsif args[0].class == Fixnum && args[1].class.method_defined?(:j_del) && args[2].class == Fixnum && args[3].class == Fixnum && !block_given? @j_del.java_method(:setBuffer, [Java::int.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::int.java_class,Java::int.java_class]).call(args[0],args[1].j_del,args[2],args[3]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_buffer(#{args[0]},#{args[1]},#{args[2]},#{args[3]})" end end |
- (self) setByte(pos, b)
byte
at position pos
in the Buffer to the value b
.The buffer will expand as necessary to accommodate any value written.
609 610 611 612 613 614 615 616 617 618 619 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 609 def set_byte(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setByte, [Java::int.java_class,Java::byte.java_class]).call(args[0],::Vertx::Util::Utils.to_byte(args[1])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_byte(#{args[0]},#{args[1]})" end end |
- (self) setDouble(pos, d)
double
at position pos
in the Buffer to the value d
.The buffer will expand as necessary to accommodate any value written.
182 183 184 185 186 187 188 189 190 191 192 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 182 def set_double(*args) if args[0].class == Fixnum && args[1].class == Float && !block_given? @j_del.java_method(:setDouble, [Java::int.java_class,Java::double.java_class]).call(args[0],::Vertx::Util::Utils.to_double(args[1])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_double(#{args[0]},#{args[1]})" end end |
- (self) setFloat(pos, f)
float
at position pos
in the Buffer to the value f
.The buffer will expand as necessary to accommodate any value written.
796 797 798 799 800 801 802 803 804 805 806 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 796 def set_float(*args) if args[0].class == Fixnum && args[1].class == Float && !block_given? @j_del.java_method(:setFloat, [Java::int.java_class,Java::float.java_class]).call(args[0],::Vertx::Util::Utils.to_float(args[1])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_float(#{args[0]},#{args[1]})" end end |
- (self) setInt(pos, i)
int
at position pos
in the Buffer to the value i
.The buffer will expand as necessary to accommodate any value written.
387 388 389 390 391 392 393 394 395 396 397 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 387 def set_int(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setInt, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_int(#{args[0]},#{args[1]})" end end |
- (self) setIntLE(pos, i)
int
at position pos
in the Buffer to the value i
in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any value written.
576 577 578 579 580 581 582 583 584 585 586 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 576 def set_int_le(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setIntLE, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_int_le(#{args[0]},#{args[1]})" end end |
- (self) setLong(pos, l)
long
at position pos
in the Buffer to the value l
.The buffer will expand as necessary to accommodate any value written.
472 473 474 475 476 477 478 479 480 481 482 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 472 def set_long(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setLong, [Java::int.java_class,Java::long.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_long(#{args[0]},#{args[1]})" end end |
- (self) setLongLE(pos, l)
long
at position pos
in the Buffer to the value l
in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any value written.
199 200 201 202 203 204 205 206 207 208 209 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 199 def set_long_le(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setLongLE, [Java::int.java_class,Java::long.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_long_le(#{args[0]},#{args[1]})" end end |
- (self) setMedium(pos, i)
int
at position pos
in the Buffer to the value i
.The buffer will expand as necessary to accommodate any value written.
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 1071 def set_medium(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setMedium, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_medium(#{args[0]},#{args[1]})" end end |
- (self) setMediumLE(pos, i)
int
at position pos
in the Buffer to the value i
. in the Little Endian Byte OrderThe buffer will expand as necessary to accommodate any value written.
762 763 764 765 766 767 768 769 770 771 772 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 762 def set_medium_le(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setMediumLE, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_medium_le(#{args[0]},#{args[1]})" end end |
- (self) setShort(pos, s)
short
at position pos
in the Buffer to the value s
.The buffer will expand as necessary to accommodate any value written.
165 166 167 168 169 170 171 172 173 174 175 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 165 def set_short(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setShort, [Java::int.java_class,Java::short.java_class]).call(args[0],::Vertx::Util::Utils.to_short(args[1])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_short(#{args[0]},#{args[1]})" end end |
- (self) setShortLE(pos, s)
short
at position pos
in the Buffer to the value s
in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any value written.
642 643 644 645 646 647 648 649 650 651 652 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 642 def set_short_le(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setShortLE, [Java::int.java_class,Java::short.java_class]).call(args[0],::Vertx::Util::Utils.to_short(args[1])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_short_le(#{args[0]},#{args[1]})" end end |
- (self) setString(pos, str) - (self) setString(pos, str, enc)
pos
in the Buffer to the value of str
encoded in encoding enc
.The buffer will expand as necessary to accommodate any value written.
452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 452 def set_string(*args) if args[0].class == Fixnum && args[1].class == String && !block_given? && args[2] == nil @j_del.java_method(:setString, [Java::int.java_class,Java::java.lang.String.java_class]).call(args[0],args[1]) return self elsif args[0].class == Fixnum && args[1].class == String && args[2].class == String && !block_given? @j_del.java_method(:setString, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1],args[2]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_string(#{args[0]},#{args[1]},#{args[2]})" end end |
- (self) setUnsignedByte(pos, b)
byte
at position pos
in the Buffer to the value b
.The buffer will expand as necessary to accommodate any value written.
779 780 781 782 783 784 785 786 787 788 789 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 779 def set_unsigned_byte(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setUnsignedByte, [Java::int.java_class,Java::short.java_class]).call(args[0],::Vertx::Util::Utils.to_short(args[1])) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_unsigned_byte(#{args[0]},#{args[1]})" end end |
- (self) setUnsignedInt(pos, i)
int
at position pos
in the Buffer to the value i
.The buffer will expand as necessary to accommodate any value written.
107 108 109 110 111 112 113 114 115 116 117 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 107 def set_unsigned_int(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setUnsignedInt, [Java::int.java_class,Java::long.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_unsigned_int(#{args[0]},#{args[1]})" end end |
- (self) setUnsignedIntLE(pos, i)
int
at position pos
in the Buffer to the value i
in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any value written.
502 503 504 505 506 507 508 509 510 511 512 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 502 def set_unsigned_int_le(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setUnsignedIntLE, [Java::int.java_class,Java::long.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_unsigned_int_le(#{args[0]},#{args[1]})" end end |
- (self) setUnsignedShort(pos, s)
short
at position pos
in the Buffer to the value s
.The buffer will expand as necessary to accommodate any value written.
124 125 126 127 128 129 130 131 132 133 134 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 124 def set_unsigned_short(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setUnsignedShort, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_unsigned_short(#{args[0]},#{args[1]})" end end |
- (self) setUnsignedShortLE(pos, s)
short
at position pos
in the Buffer to the value s
in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any value written.
76 77 78 79 80 81 82 83 84 85 86 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 76 def set_unsigned_short_le(*args) if args[0].class == Fixnum && args[1].class == Fixnum && !block_given? @j_del.java_method(:setUnsignedShortLE, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]) return self end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling set_unsigned_short_le(#{args[0]},#{args[1]})" end end |
- (::Vertx::Buffer) slice - (::Vertx::Buffer) slice(start, end)
248 249 250 251 252 253 254 255 256 257 258 259 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 248 def slice(*args) if !block_given? && args[0] == nil && args[1] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:slice, []).call(),::Vertx::Buffer) elsif args[0].class == Fixnum && args[1].class == Fixnum && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:slice, [Java::int.java_class,Java::int.java_class]).call(args[0],args[1]),::Vertx::Buffer) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling slice(#{args[0]},#{args[1]})" end end |
- (Object) toJson
486 487 488 489 490 491 492 493 494 495 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 486 def to_json if !block_given? return ::Vertx::Util::Utils.from_object(@j_del.java_method(:toJson, []).call()) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling to_json()" end end |
- (Array<String,Object>) toJsonArray
371 372 373 374 375 376 377 378 379 380 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 371 def to_json_array if !block_given? return @j_del.java_method(:toJsonArray, []).call() != nil ? JSON.parse(@j_del.java_method(:toJsonArray, []).call().encode) : nil end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling to_json_array()" end end |
- (Hash{String => Object}) toJsonObject
532 533 534 535 536 537 538 539 540 541 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 532 def to_json_object if !block_given? return @j_del.java_method(:toJsonObject, []).call() != nil ? JSON.parse(@j_del.java_method(:toJsonObject, []).call().encode) : nil end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling to_json_object()" end end |
- (String) toString - (String) toString(enc)
String
representation of the Buffer with the encoding specified by enc
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/buffer.rb', line 1037 def to_string(*args) if !block_given? && args[0] == nil return @j_del.java_method(:toString, []).call() elsif args[0].class == String && !block_given? return @j_del.java_method(:toString, [Java::java.lang.String.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling to_string(#{args[0]})" end end |