BLIP/BLIPMessage.m
changeset 3 76f302097a75
parent 1 8267d5c429c4
child 8 6f539dd9921c
     1.1 --- a/BLIP/BLIPMessage.m	Sat May 24 13:26:02 2008 -0700
     1.2 +++ b/BLIP/BLIPMessage.m	Sat May 24 21:26:09 2008 -0700
     1.3 @@ -144,6 +144,22 @@
     1.4  }
     1.5  
     1.6  
     1.7 +- (NSString*) bodyString
     1.8 +{
     1.9 +    NSData *body = self.body;
    1.10 +    if( body )
    1.11 +        return [[[NSString alloc] initWithData: body encoding: NSUTF8StringEncoding] autorelease];
    1.12 +    else
    1.13 +        return nil;
    1.14 +}
    1.15 +
    1.16 +- (void) setBodyString: (NSString*)string
    1.17 +{
    1.18 +    self.body = [string dataUsingEncoding: NSUTF8StringEncoding];
    1.19 +    self.contentType = @"text/plain; charset=UTF-8";
    1.20 +}
    1.21 +
    1.22 +
    1.23  - (BLIPProperties*) properties
    1.24  {
    1.25      return _properties;