class Empp::Utils::ByteBuffer
Public Class Methods
new(data = nil)
click to toggle source
# File lib/empp/utils/bytebuffer.rb, line 10 def initialize(data = nil) @buf = data || '' @offset = 0 end
Public Instance Methods
append_string(strValue)
click to toggle source
# File lib/empp/utils/bytebuffer.rb, line 23 def append_string(strValue) @buf << strValue end
append_uint_be(intValue)
click to toggle source
# File lib/empp/utils/bytebuffer.rb, line 15 def append_uint_be(intValue) @buf << Utils.getUintBe(intValue) end
append_uint_le(intValue)
click to toggle source
# File lib/empp/utils/bytebuffer.rb, line 19 def append_uint_le(intValue) @buf << Utils.getUintLe(intValue) end
data()
click to toggle source
# File lib/empp/utils/bytebuffer.rb, line 27 def data @buf end
to_s()
click to toggle source
# File lib/empp/utils/bytebuffer.rb, line 31 def to_s @buf.unpack("H*") end