SKMemoryStream

public final class SKMemoryStream : SKStream

A memory-based stream.

  • Undocumented

    Declaration

    Swift

    public init()
  • Creates a new instance of SKMemoryStream with a buffer size of the specified size.

    Declaration

    Swift

    public init?(length: Int)

    Parameters

    lenght

    the desired size for the in-memory stream

  • Creates a new instance of SKMemoryStream with the buffer being the provided data.

    Declaration

    Swift

    public init?(_ data: UnsafeRawPointer!, _ length: Int, copyData: Bool = true)

    Parameters

    data

    pointer to a block of memory that will be wrapped as a memory stream

    length

    the size for the stream

    copyData

    if true this will allocate a buffer and make a copy of the data, otherwise, it will use the data as provided.

  • Creates a new instance of SKMemoryStream with the buffer being the provided data.

    Declaration

    Swift

    public init?(_ data: SKData)

    Parameters

    data

    The data wrapper

  • Resets the stream with a copy of the provided data.

    Declaration

    Swift

    public func setMemory(data: inout [UInt8])