def cast_to(type, parser = nil)
            assert_cast_type(type)

            cast = type.new(self.copy, parser)
            cast.file_offset = @file_offset

            transfer_attributes(cast)
        end
def cast_to(type, parser = nil)
            assert_cast_type(type)

            cast = type.new(self.copy, parser)
            cast.file_offset = @file_offset

            transfer_attributes(cast)
        end
Casts an object to a new type.