code: def serialiseString(self, s):
          
          if type(s) is unicode:
              s = self.context.getBytesForString(s)
  
          l = len(s)
  
          if l > 0xffff:
              self.stream.write_ulong(l)
          else:
              self.stream.write_ushort(l)
  
          self.stream.write(s)
docs: Similar to L{writeString} but does not encode a type byte.