def writeBytes(self, s):
        """
        Write a string of bytes to the data stream.
        """
        l = len(s)

        if l > 0xffff:
            self.writeType(TYPE_LONGSTRING)
        else:
            self.writeType(TYPE_STRING)

        if l > 0xffff:
            self.stream.write_ulong(l)
        else:
            self.stream.write_ushort(l)

        self.stream.write(s)
def writeBytes ( self , s ) : l = len ( s ) if l > 0xffff : self . writeType ( TYPE_LONGSTRING ) else : self . writeType ( TYPE_STRING ) if l > 0xffff : self . stream . write_ulong ( l ) else : self . stream . write_ushort ( l ) self . stream . write ( s )
Write a string of bytes to the data stream.