Object
# File lib/rchardet/codingstatemachine.rb, line 63 def get_coding_state_machine return @model['name'] end
# File lib/rchardet/codingstatemachine.rb, line 59 def get_current_charlen return @currentCharLen end
# File lib/rchardet/codingstatemachine.rb, line 44 def next_state(c) # for each byte we get its class # if it is first byte, we also get byte length b = c.bytes.first byteCls = @model['classTable'][b] if @currentState == EStart @currentBytePos = 0 @currentCharLen = @model['charLenTable'][byteCls] end # from byte's class and stateTable, we get its next state @currentState = @model['stateTable'][@currentState * @model['classFactor'] + byteCls] @currentBytePos += 1 return @currentState end
Generated with the Darkfish Rdoc Generator 2.