class Fluent::WinEvtLog::FilePositionEntry

Constants

LN_OFFSET
NUM_OFFSET
NUM_SIZE
SIZE
START_SIZE

Public Class Methods

new(file, seek) click to toggle source
# File lib/fluent/plugin/in_winevtlog.rb, line 259
def initialize(file, seek)
  @file = file
  @seek = seek
end

Public Instance Methods

read_num() click to toggle source
# File lib/fluent/plugin/in_winevtlog.rb, line 275
def read_num
  @file.pos = @seek + NUM_OFFSET
  raw = @file.read(NUM_SIZE)
  raw ? raw.to_i(16) : 0
end
read_start() click to toggle source
# File lib/fluent/plugin/in_winevtlog.rb, line 269
def read_start
  @file.pos = @seek
  raw = @file.read(START_SIZE)
  raw ? raw.to_i(16) : 0
end
update(start, num) click to toggle source
# File lib/fluent/plugin/in_winevtlog.rb, line 264
def update(start, num)
  @file.pos = @seek
  @file.write "%08x\t%08x" % [start, num]
end