def _validate(self):
<EOL>if not isinstance(self.box[<NUM_LIT:1>], FileTypeBox):<EOL><INDENT>msg = "<STR_LIT>"<EOL>msg = msg.format(filename=self.filename)<EOL>raise IOError(msg)<EOL><DEDENT>ftyp = self.box[<NUM_LIT:1>]<EOL>if ftyp.brand == '<STR_LIT>':<EOL><INDENT>jp2h = [box for box in self.box if box.box_id == '<STR_LIT>'][<NUM_LIT:0>]<EOL>colrs = [box for box in jp2h.box if box.box_id == '<STR_LIT>']<EOL>for colr in colrs:<EOL><INDENT>if colr.method not in (core.ENUMERATED_COLORSPACE,<EOL>core.RESTRICTED_ICC_PROFILE):<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>warnings.warn(msg, UserWarning)<EOL><DEDENT><DEDENT><DEDENT>
Validate the JPEG 2000 outermost superbox.  These checks must be
        done at a file level.