def Write(self, data):
    self._Send('WRTE', arg0=self.local_id, arg1=self.remote_id, data=data)
    # Expect an ack in response.
    cmd, okay_data = self.ReadUntil('OKAY')
    if cmd != 'OKAY':
      if cmd == 'FAIL':
        raise usb_exceptions.AdbCommandFailureException(
            'Command failed.', okay_data)
      raise InvalidCommandError(
          'Expected an OKAY in response to a WRITE, got %s (%s)',
          cmd, okay_data)
    return len(data)
Decode a short string value from ``encoded`` data at ``offset``.
dataset/ETHPy150Open google/python-adb/adb/adb_protocol.py/_AdbConnection.Write--crossover with--dataset/ETHPy150Open pika/pika/pika/data.py/decode_short_string