SKWStream

public class SKWStream

Undocumented

  • Gets the number of bytes written so far.

    Declaration

    Swift

    public var bytesWritten: Int { get }
  • Write the provided data to the stream.

    Declaration

    Swift

    public func write(_ buffer: inout [UInt8], _ size: Int) -> Bool

    Parameters

    buffer

    the buffer containing the data to be written

    size

    the number of bytes to write to the stream

    Return Value

    Returns true if the write succeeded, otherwise false.

  • Write a newline character to the stream, if one was not already written. Returns: Returns true if the write succeeded, otherwise false.

    Declaration

    Swift

    public func newLine() -> Bool
  • Flush the buffer to the underlying destination.

    Declaration

    Swift

    public func flush()
  • Write the number of specified bytes from the provided stream into this stream

    Declaration

    Swift

    public func writeStream(stream: SKStream, length: Int)
  • Writes the provided UIn8 to the stream

    Declaration

    Swift

    public func write(byte: UInt8)
  • Writes the provided UInt16 to the stream

    Declaration

    Swift

    public func write(uint16: UInt16)
  • Writes the provided UInt32 to the stream

    Declaration

    Swift

    public func write(uint32: UInt32)
  • Writes the provided text to the stream

    Declaration

    Swift

    public func write(text: String)