FileBufferingReadStream Clase

Definición

Un objeto Stream que encapsula otra secuencia y permite el rebobinado almacenando en búfer el contenido tal y como se lee. El contenido se almacena en búfer en memoria hasta un tamaño determinado y, a continuación, se agrupa en un archivo temporal en el disco. El archivo temporal se eliminará en Dispose.

public ref class FileBufferingReadStream : System::IO::Stream
public class FileBufferingReadStream : System.IO.Stream
type FileBufferingReadStream = class
    inherit Stream
Public Class FileBufferingReadStream
Inherits Stream
Herencia
FileBufferingReadStream

Constructores

FileBufferingReadStream(Stream, Int32)

Inicializa una nueva instancia de la clase FileBufferingReadStream.

FileBufferingReadStream(Stream, Int32, Nullable<Int64>, Func<String>)

Inicializa una nueva instancia de la clase FileBufferingReadStream.

FileBufferingReadStream(Stream, Int32, Nullable<Int64>, Func<String>, ArrayPool<Byte>)

Inicializa una nueva instancia de la clase FileBufferingReadStream.

FileBufferingReadStream(Stream, Int32, Nullable<Int64>, String)

Inicializa una nueva instancia de la clase FileBufferingReadStream.

FileBufferingReadStream(Stream, Int32, Nullable<Int64>, String, ArrayPool<Byte>)

Inicializa una nueva instancia de la clase FileBufferingReadStream.

Propiedades

CanRead

When overridden in a derived class, gets a value indicating whether the current stream supports reading.

CanSeek

When overridden in a derived class, gets a value indicating whether the current stream supports seeking.

CanWrite

When overridden in a derived class, gets a value indicating whether the current stream supports writing.

InMemory

Obtiene un valor que determina si el contenido se almacena en búfer por completo en la memoria.

Length

El total de bytes leídos y almacenados en búfer por la secuencia hasta ahora, no representará la longitud completa de los datos hasta que la secuencia esté completamente almacenada en búfer. Por ejemplo, mediante stream. DrainAsync().

MemoryThreshold

Cantidad máxima de memoria en bytes que se va a asignar antes de cambiar a un archivo en el disco.

Position

When overridden in a derived class, gets or sets the position within the current stream.

TempFileName

Obtiene un valor que determina dónde se almacena en búfer el contenido en el disco.

Métodos

CopyToAsync(Stream, Int32, CancellationToken)

Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token. Both streams positions are advanced by the number of bytes copied.

Dispose(Boolean)

Releases the unmanaged resources used by the Stream and optionally releases the managed resources.

DisposeAsync()

Asynchronously releases the unmanaged resources used by the Stream.

Flush()

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Read(Byte[], Int32, Int32)

When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Read(Span<Byte>)

When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

ReadAsync(Byte[], Int32, Int32, CancellationToken)

Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.

ReadAsync(Memory<Byte>, CancellationToken)

Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.

Seek(Int64, SeekOrigin)

When overridden in a derived class, sets the position within the current stream.

SetLength(Int64)

When overridden in a derived class, sets the length of the current stream.

Write(Byte[], Int32, Int32)

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

WriteAsync(Byte[], Int32, Int32, CancellationToken)

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

WriteAsync(ReadOnlyMemory<Byte>, CancellationToken)

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

Se aplica a