'@param rbuffer: Data received.
@type rbuffer: L{bytes} or L{bytearray}'

def dataReceived(self, rbuffer):

    if isinstance(rbuffer, bytes):
        pass
    elif isinstance(rbuffer, bytearray):
        rbuffer = bytes(rbuffer)
    else:
        raise TypeError(('data    must    be    bytes    or    bytearray,    not    ' + type(rbuffer)))
    self.protocol.dataReceived(rbuffer)
