StreamBase

open class StreamBase: DataValue

Abstract base class for streams.

See also

ByteStream, CharStream.
  • Default initializer.

    Declaration

    Swift

    override public init()
  • 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 -> Void
  • Entity tag if known, otherwise nil.

    See also

    HTTP ETag.

    Declaration

    Swift

    open var entityTag: String?
  • File name if known, otherwise nil.

    Declaration

    Swift

    open var fileName: String?
  • Flush any buffered writes from this stream.

    Declaration

    Swift

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

    Declaration

    Swift

    open var mediaType: String?