def METHOD_NAME(self):
    while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
        self.update_raw()
    if isinstance(self.raw_buffer, bytes):
        if self.raw_buffer.startswith(codecs.BOM_UTF16_LE):
            self.raw_decode = codecs.utf_16_le_decode
            self.encoding = "utf-16-le"
        elif self.raw_buffer.startswith(codecs.BOM_UTF16_BE):
            self.raw_decode = codecs.utf_16_be_decode
            self.encoding = "utf-16-be"
        else:
            self.raw_decode = codecs.utf_8_decode
            self.encoding = "utf-8"
    self.update(1)