def read_value(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0):
try:<EOL><INDENT>value = unpack('<STR_LIT>', istream.read(self.LENGTH))[<NUM_LIT:0>]<EOL><DEDENT>except Exception:<EOL><INDENT>self.logger.error("<STR_LIT>")<EOL>raise<EOL><DEDENT>if value == <NUM_LIT:1>:<EOL><INDENT>self.value = True<EOL><DEDENT>elif value == <NUM_LIT:0>:<EOL><INDENT>self.value = False<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>".format(value))<EOL><DEDENT>self.validate()<EOL>
Read the value of the Boolean object from the input stream.

Args:
    istream (Stream): A buffer containing the encoded bytes of the
        value of a Boolean object. 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:
    ValueError: if the read boolean value is not a 0 or 1.