FileBufferingReadStream Třída

Definice

Stream, který zabalí jiný datový proud a povolí převinutím do vyrovnávací paměti obsah při čtení. Obsah je uložen do vyrovnávací paměti až do určité velikosti a pak je zařazován do dočasného souboru na disku. Dočasný soubor se odstraní při odstranění.

public ref class FileBufferingReadStream : System::IO::Stream
public class FileBufferingReadStream : System.IO.Stream
type FileBufferingReadStream = class
    inherit Stream
Public Class FileBufferingReadStream
Inherits Stream
Dědičnost
FileBufferingReadStream

Konstruktory

FileBufferingReadStream(Stream, Int32)

Inicializuje novou instanci .FileBufferingReadStream

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

Inicializuje novou instanci .FileBufferingReadStream

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

Inicializuje novou instanci .FileBufferingReadStream

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

Inicializuje novou instanci .FileBufferingReadStream

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

Inicializuje novou instanci .FileBufferingReadStream

Vlastnosti

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

Získá hodnotu, která určuje, jestli je obsah zcela v paměti.

Length

Celkové bajty načtené z datového proudu do vyrovnávací paměti a dosud nebudou představovat celou délku dat, dokud se datový proud plně uloží do vyrovnávací paměti. například pomocí streamu. DrainAsync().

MemoryThreshold

Maximální velikost paměti v bajtech, která se má přidělit před přepnutím na soubor na disku.

Position

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

TempFileName

Získá hodnotu, která určuje, kam se obsah ukládají do vyrovnávací paměti na disku.

Metody

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.

Platí pro