Class: ByteBuffer::Buffer
- Inherits:
-
Object
- Object
- ByteBuffer::Buffer
- Defined in:
- lib/byte_buffer/buffer.rb,
ext/byte_buffer_ext/byte_buffer.c
Constant Summary collapse
- DEFAULT_PREALLOC_SIZE =
INT2FIX(BYTE_BUFFER_EMBEDDED_SIZE)
Instance Method Summary collapse
- #append ⇒ Object (also: #<<)
- #append_byte ⇒ Object
- #append_byte_array ⇒ Object
- #append_double ⇒ Object
- #append_float ⇒ Object
- #append_int ⇒ Object
- #append_long ⇒ Object
- #append_short ⇒ Object
- #capacity ⇒ Object
- #discard ⇒ Object
- #dup ⇒ Object
- #empty? ⇒ Boolean
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
- #index ⇒ Object
- #initialize ⇒ Object constructor
- #inspect ⇒ Object
- #length ⇒ Object (also: #size, #bytesize)
- #read ⇒ Object
- #read_byte ⇒ Object
- #read_byte_array ⇒ Object
- #read_double ⇒ Object
- #read_float ⇒ Object
- #read_int ⇒ Object
- #read_long ⇒ Object
- #read_short ⇒ Object
- #to_str ⇒ Object (also: #cheap_peek, #to_s)
- #update ⇒ Object
Constructor Details
#initialize ⇒ Object
15 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 15
static VALUE rb_byte_buffer_initialize(int argc, VALUE *argv, VALUE self);
|
Instance Method Details
#append ⇒ Object Also known as: <<
18 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 18
static VALUE rb_byte_buffer_append(VALUE self, VALUE str);
|
#append_byte ⇒ Object
21 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 21
static VALUE rb_byte_buffer_append_byte(VALUE self, VALUE i);
|
#append_byte_array ⇒ Object
25 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 25
static VALUE rb_byte_buffer_append_byte_array(VALUE self, VALUE ary);
|
#append_double ⇒ Object
23 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 23
static VALUE rb_byte_buffer_append_double(VALUE self, VALUE i);
|
#append_float ⇒ Object
24 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 24
static VALUE rb_byte_buffer_append_float(VALUE self, VALUE i);
|
#append_int ⇒ Object
20 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 20
static VALUE rb_byte_buffer_append_int(VALUE self, VALUE i);
|
#append_long ⇒ Object
19 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 19
static VALUE rb_byte_buffer_append_long(VALUE self, VALUE i);
|
#append_short ⇒ Object
22 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 22
static VALUE rb_byte_buffer_append_short(VALUE self, VALUE i);
|
#capacity ⇒ Object
16 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 16 static VALUE rb_byte_buffer_capacity(VALUE self); |
#discard ⇒ Object
26 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 26
static VALUE rb_byte_buffer_discard(VALUE self, VALUE n);
|
#dup ⇒ Object
22 23 24 |
# File 'lib/byte_buffer/buffer.rb', line 22 def dup self.class.new(self.to_str) end |
#empty? ⇒ Boolean
9 10 11 |
# File 'lib/byte_buffer/buffer.rb', line 9 def empty? self.length == 0 end |
#eql?(other) ⇒ Boolean Also known as: ==
13 14 15 |
# File 'lib/byte_buffer/buffer.rb', line 13 def eql?(other) self.to_str.eql?(other.to_str) end |
#hash ⇒ Object
18 19 20 |
# File 'lib/byte_buffer/buffer.rb', line 18 def hash to_str.hash end |
#index ⇒ Object
35 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 35
static VALUE rb_byte_buffer_index(int argc, VALUE *argv, VALUE self);
|
#inspect ⇒ Object
38 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 38 static VALUE rb_byte_buffer_inspect(VALUE self); |
#length ⇒ Object Also known as: size, bytesize
17 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 17 static VALUE rb_byte_buffer_length(VALUE self); |
#read ⇒ Object
27 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 27
static VALUE rb_byte_buffer_read(VALUE self, VALUE n);
|
#read_byte ⇒ Object
31 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 31
static VALUE rb_byte_buffer_read_byte(int argc, VALUE *argv, VALUE self);
|
#read_byte_array ⇒ Object
34 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 34
static VALUE rb_byte_buffer_read_byte_array(int argc, VALUE *argv, VALUE self);
|
#read_double ⇒ Object
32 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 32 static VALUE rb_byte_buffer_read_double(VALUE self); |
#read_float ⇒ Object
33 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 33 static VALUE rb_byte_buffer_read_float(VALUE self); |
#read_int ⇒ Object
29 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 29
static VALUE rb_byte_buffer_read_int(int argc, VALUE *argv, VALUE self);
|
#read_long ⇒ Object
28 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 28
static VALUE rb_byte_buffer_read_long(int argc, VALUE *argv, VALUE self);
|
#read_short ⇒ Object
30 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 30
static VALUE rb_byte_buffer_read_short(int argc, VALUE *argv, VALUE self);
|
#to_str ⇒ Object Also known as: cheap_peek, to_s
37 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 37 static VALUE rb_byte_buffer_to_str(VALUE self); |
#update ⇒ Object
36 |
# File 'ext/byte_buffer_ext/byte_buffer.c', line 36
static VALUE rb_byte_buffer_update(VALUE self, VALUE location, VALUE bytes);
|