Class: NBTFile::Private::CompoundTokenizerState

Inherits:
Object
  • Object
show all
Includes:
ReadMethods, Tokens
Defined in:
lib/nbtfile.rb

Instance Method Summary collapse

Methods included from ReadMethods

#read_byte, #read_byte_array, #read_double, #read_float, #read_int, #read_integer, #read_list_header, #read_long, #read_raw, #read_short, #read_string, #read_type, #read_value

Methods included from CommonMethods

#sign_bit

Constructor Details

#initialize(cont) ⇒ CompoundTokenizerState

Returns a new instance of CompoundTokenizerState.



253
254
255
# File 'lib/nbtfile.rb', line 253

def initialize(cont)
  @cont = cont
end

Instance Method Details

#get_token(io) ⇒ Object



257
258
259
260
261
262
263
264
265
266
267
# File 'lib/nbtfile.rb', line 257

def get_token(io)
  type = read_type(io)

  if type != TAG_End
    name = read_string(io)
  else
    name = ""
  end

  read_value(io, type, name, self, @cont)
end