Contents

write(from:)

Writes data from the specified buffer, not exceeding the buffer’s allocated size.

Declaration

func write(from buffer: UnsafeRawBufferPointer) throws -> Int

Parameters

  • buffer:

    The data buffer that the operation uses as a source for the data.

Return Value

The number of bytes written by the stream.

Discussion

This function increments the internal stream position by the number of bytes written by the stream.

See Also

Reading and Writing Data