'Sets the value of the object
:param value:
An integer
:raises:
ValueError - when an invalid value is passed'

def set(self, value):

    if (not isinstance(value, int_types)):
        raise TypeError(unwrap(u'\n                                                                %s    value    must    be    an    integer,    not    %s\n                                                                ', type_name(self), type_name(value)))
    self._native = value
    self.contents = ('\x00' + int_to_bytes(value, signed=True))
    self._header = None
    if self._indefinite:
        self._indefinite = False
        self.method = 0
    if (self._trailer != ''):
        self._trailer = ''
