Created
August 21, 2012 07:49
-
-
Save mingchen/3413229 to your computer and use it in GitHub Desktop.
How to use NSOutputStream's outputStreamToMemoryDemo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)outputStreamToMemoryDemo | |
{ | |
NSOutputStream *output = [NSOutputStream outputStreamToMemory]; | |
[output open]; | |
// | |
//... | |
// | |
[output close]; | |
NSData * data = [output propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment