Class Ole::Storage::Header
In: lib/ole/storage/base.rb
Parent: Struct.new( :magic, :clsid, :minor_ver, :major_ver, :byte_order, :b_shift, :s_shift, :reserved, :csectdir, :num_bat, :dirent_start, :transacting_signature, :threshold, :sbat_start, :num_sbat, :mbat_start, :num_mbat

A class which wraps the ole header

Header.new can be both used to load from a string, or to create from defaults. Serialization is accomplished with the to_s method.

Methods

new   to_s   validate!  

Constants

PACK = 'a8 a16 v2 a2 v2 a6 V3 a4 V5'
SIZE = 0x4c
MAGIC = "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1"   i have seen it pointed out that the first 4 bytes of hex, 0xd0cf11e0, is supposed to spell out docfile. hmmm :)
EOC = 0xfffffffe   what you get if creating new header from scratch. AllocationTable::EOC isn‘t available yet. meh.
DEFAULT = [ MAGIC, 0.chr * 16, 59, 3, "\xfe\xff", 9, 6, 0.chr * 6, 0, 1, EOC, 0.chr * 4, 4096, EOC, 0, EOC, 0

Public Class methods

Public Instance methods

[Validate]