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
lenghtthe 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
datapointer to a block of memory that will be wrapped as a memory stream
lengththe size for the stream
copyDataif
truethis 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
dataThe data wrapper
-
Resets the stream with a copy of the provided data.
Declaration
Swift
public func setMemory(data: inout [UInt8])
View on GitHub
Install in Dash
SKMemoryStream Class Reference