'Return either BIG_ENDIAN or LITTLE_ENDIAN depending on the endian
indicator found in the TIFF *stream* header, either \'MM\' or \'II\'.'

@classmethod
def _detect_endian(cls, stream):

    stream.seek(0)
    endian_str = stream.read(2)
    return (BIG_ENDIAN if (endian_str == 'MM') else LITTLE_ENDIAN)
