Initializer

init(data:)

Initializes and returns an NSInputStream object for reading from a given NSData object.

Declaration

init(data: Data)

Parameters

data

The data object from which to read. The contents of data are copied.

Return Value

An initialized NSInputStream object for reading from data.

Discussion

The stream must be opened before it can be used.

See Also

Creating Streams

init?(fileAtPath: String)

Initializes and returns an NSInputStream object that reads data from the file at a given path.

init?(url: URL)

Initializes and returns an NSInputStream object that reads data from the file at a given URL.