Instance Method

initToMemory

Returns an initialized output stream that will write to memory.

Declaration

- (instancetype)initToMemory;

Return Value

An initialized output stream that will write stream data to memory.

Discussion

The stream must be opened before it can be used.

The contents of the memory stream are retrieved by passing the constant NSStreamDataWrittenToMemoryStreamKey to propertyForKey:.

See Also

Creating Streams

+ outputStreamToMemory

Creates and returns an initialized output stream that will write stream data to memory.

+ outputStreamToBuffer:capacity:

Creates and returns an initialized output stream that can write to a provided buffer.

+ outputStreamToFileAtPath:append:

Creates and returns an initialized output stream for writing to a specified file.

+ outputStreamWithURL:append:

Creates and returns an initialized output stream for writing to a specified URL.

- initToBuffer:capacity:

Returns an initialized output stream that can write to a provided buffer.

- initToFileAtPath:append:

Returns an initialized output stream for writing to a specified file.

- initWithURL:append:

Returns an initialized output stream for writing to a specified URL.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software