'Raises IOError and apev2.error'

def __init__(self, fileobj):

    self.__find_metadata(fileobj)
    if (self.header is None):
        self.metadata = self.footer
    elif (self.footer is None):
        self.metadata = self.header
    else:
        self.metadata = max(self.header, self.footer)
    if (self.metadata is None):
        return
    self.__fill_missing(fileobj)
    self.__fix_brokenness(fileobj)
    if (self.data is not None):
        fileobj.seek(self.data)
        self.tag = fileobj.read(self.size)
