def detectBOM(self):
bomDict = {<EOL>codecs.BOM_UTF8: '<STR_LIT:utf-8>',<EOL>codecs.BOM_UTF16_LE: '<STR_LIT>', codecs.BOM_UTF16_BE: '<STR_LIT>',<EOL>codecs.BOM_UTF32_LE: '<STR_LIT>', codecs.BOM_UTF32_BE: '<STR_LIT>'<EOL>}<EOL>string = self.rawStream.read(<NUM_LIT:4>)<EOL>assert isinstance(string, bytes)<EOL>encoding = bomDict.get(string[:<NUM_LIT:3>])         <EOL>seek = <NUM_LIT:3><EOL>if not encoding:<EOL><INDENT>encoding = bomDict.get(string)         <EOL>seek = <NUM_LIT:4><EOL>if not encoding:<EOL><INDENT>encoding = bomDict.get(string[:<NUM_LIT:2>])  <EOL>seek = <NUM_LIT:2><EOL><DEDENT><DEDENT>if encoding:<EOL><INDENT>self.rawStream.seek(seek)<EOL>return lookupEncoding(encoding)<EOL><DEDENT>else:<EOL><INDENT>self.rawStream.seek(<NUM_LIT:0>)<EOL>return None<EOL><DEDENT>
Attempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return None