class · System.IO

StreamWriter

public class System.IO.StreamWriter : System.IO.TextWriter

Text written to a stream as UTF-8, through a buffer.

Tipo
class
Espacio de nombres
System.IO
Ensamblado
System.Core
Acceso
public
Archivo fuente
TextIO.ant

Herencia

Clases base
Any TextWriter StreamWriter

Constructores

constructor StreamWriter(stream: System.IO.Stream)
#
constructor StreamWriter(stream: System.IO.Stream, bufferSize: i32)
#
constructor StreamWriter(path: System.String<u8>)
#

A new file (or the file emptied).

constructor StreamWriter(path: System.String<u8>, append: bool)
#

A file written from its end when append, else emptied first.

Propiedades

property AutoFlush: bool
#

Sends the text to the stream after every Write.

property BaseStream: System.IO.Stream
#

read-only

The stream it writes to.

Métodos

method Write(text: System.String<u8>) -> void
#

override

method Write(c: u16) -> void
#

override

method Flush() -> void
#

override

method Close() -> void
#

override

Miembros privados e internos (4)

field stream: System.IO.Stream
#

private

field buffer: u8[]
#

private

field used: i32
#

private

method Drain() -> void
#

private

Writes what is buffered (without flushing the stream).

Miembros heredados (42)

Código fuente

StreamWriter en Larva HIR, descompilado a partir de su Larva HIR.

System.IO.StreamWriter.hir
// Text written to a stream as UTF-8, through a buffer.
public class System.IO.StreamWriter : System.IO.TextWriter
{
    field stream: System.IO.Stream
    field buffer: u8[]
    field used: i32
    // Writes what is buffered (without flushing the stream).
    method Drain() -> void
    constructor StreamWriter(stream: System.IO.Stream)
    constructor StreamWriter(stream: System.IO.Stream, bufferSize: i32)
    // A new file (or the file emptied).
    constructor StreamWriter(path: System.String<u8>)
    // A file written from its end when `append`, else emptied first.
    constructor StreamWriter(path: System.String<u8>, append: bool)
    method Write(text: System.String<u8>) -> void
    method Write(c: u16) -> void
    method Flush() -> void
    method Close() -> void
    // Sends the text to the stream after every Write.
    property AutoFlush: bool
    // The stream it writes to.
    property BaseStream: System.IO.Stream
}
Esc