def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0):
super(LongInteger, self).read(istream, kmip_version=kmip_version)<EOL>if self.length is not LongInteger.LENGTH:<EOL><INDENT>raise exceptions.InvalidPrimitiveLength(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>LongInteger.LENGTH, self.length))<EOL><DEDENT>self.value = unpack('<STR_LIT>', istream.read(self.length))[<NUM_LIT:0>]<EOL>self.validate()<EOL>
Read the encoding of the LongInteger from the input stream.

Args:
    istream (stream): A buffer containing the encoded bytes of a
        LongInteger. Usually a BytearrayStream object. Required.
    kmip_version (KMIPVersion): An enumeration defining the KMIP
        version with which the object will be decoded. Optional,
        defaults to KMIP 1.0.

Raises:
    InvalidPrimitiveLength: if the long integer encoding read in has
        an invalid encoded length.