Contents

getBuffer(_:length:)

Returns by reference a pointer to a read buffer and, by reference, the number of bytes available, and returns a Boolean value that indicates whether the buffer is available.

Declaration

func getBuffer(_ buffer: UnsafeMutablePointer<UnsafeMutablePointer<UInt8>?>, length len: UnsafeMutablePointer<Int>) -> Bool

Parameters

  • buffer:

    Upon return, contains a pointer to a read buffer. The buffer is only valid until the next stream operation is performed.

  • len:

    Upon return, contains the number of bytes available.

Return Value

true if the buffer is available, otherwise false.

Discussion

Subclasses of NSInputStream may return false if this operation is not appropriate for the stream type.

See Also

Using Streams