def addOutput(data, offset, length)
      out = data[offset..(offset + length - 1)] # -1 for ¥x00
      @output << out.force_encoding('UTF-8')
      unless @line_receiver.nil?
        lines = @output.split("\n")
        @output = (@output[-1] != "\n") ? lines.pop : ''
        lines.each { |line|
          @line_receiver.call(line.chomp)
        }
      end
    end
def addOutput(data, offset, length)
      out = data[offset..(offset + length - 1)] # -1 for ¥x00
      @output << out.force_encoding('UTF-8')
      unless @line_receiver.nil?
        lines = @output.split("\n")
        @output = (@output[-1] != "\n") ? lines.pop : ''
        lines.each { |line|
          @line_receiver.call(line.chomp)
        }
      end
    end
Override