StreamBase

open class StreamBase : DataValue

Abstract base class for streams.

See also

ByteStream, CharStream.
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Check this stream (e.g. to see if I/O might have been cancelled). To avoid performance degradation, this function should be called infrequently.

    Declaration

    Swift

    open func check() throws
  • Close this stream. Automatically calls flush before closing. This function can be safely called if the stream is already closed.

    Declaration

    Swift

    open func close() throws
  • Entity tag if known, otherwise nil.

    See also

    HTTP ETag.

    Declaration

    Swift

    open var entityTag: String? { get set }
  • File name if known, otherwise nil.

    Declaration

    Swift

    open var fileName: String? { get set }
  • Flush any buffered writes from this stream.

    Declaration

    Swift

    open func flush() throws
  • Media type if known, otherwise nil.

    Declaration

    Swift

    open var mediaType: String? { get set }