陈斌彬的技术博客

Stay foolish,stay hungry

NSMutableData

NSMutableData生成:

NSMutableData *md = [NSMutableData data];
NSMutableData *md = [[NSMutableData alloc] initWithLength:100]; //size100

追加data内容:

[md  appendData: dt];

设置data内容:

[md setData:dt];

变更size:

[md setLength:50];