InMemoryRandomAccessStream Klasse

Definition

Ermöglicht den zufälligen Zugriff auf Daten in Eingabe- und Ausgabedatenströmen, die nicht auf dem Datenträger, sondern im Arbeitsspeicher gespeichert sind.

public ref class InMemoryRandomAccessStream sealed : IClosable, IRandomAccessStream
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InMemoryRandomAccessStream final : IClosable, IRandomAccessStream
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class InMemoryRandomAccessStream final : IClosable, IRandomAccessStream
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InMemoryRandomAccessStream : System.IDisposable, IRandomAccessStream
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class InMemoryRandomAccessStream : System.IDisposable, IRandomAccessStream
function InMemoryRandomAccessStream()
Public NotInheritable Class InMemoryRandomAccessStream
Implements IDisposable, IRandomAccessStream
Vererbung
Object Platform::Object IInspectable InMemoryRandomAccessStream
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Beispiele

Weitere Informationen finden Sie im Codebeispiel im Thema DataReader .

Konstruktoren

InMemoryRandomAccessStream()

Erstellt eine neue instance der InMemoryRandomAccessStream-Klasse.

Eigenschaften

CanRead

Ruft einen Wert ab, der angibt, ob der Stream gelesen werden kann.

CanWrite

Ruft einen Wert ab, der angibt, ob der Stream geschrieben werden kann.

Position

Ruft den Byteoffset des Datenstroms ab.

Size

Ruft die Größe des Datenstroms für den zufälligen Zugriff ab oder legt diese fest.

Methoden

CloneStream()

Erstellt eine neue instance eines IRandomAccessStream über dieselbe Ressource wie der aktuelle Stream.

Close()

Schließt den aktuellen Stream und gibt Systemressourcen frei.

Dispose()

Führt anwendungsspezifische Aufgaben durch, die mit der Freigabe, der Zurückgabe oder dem Zurücksetzen von nicht verwalteten Ressourcen zusammenhängen.

FlushAsync()

Löscht Daten asynchron in einem sequenziellen Stream.

GetInputStreamAt(UInt64)

Gibt einen Eingabedatenstrom an einer angegebenen Position in einem Stream zurück.

GetOutputStreamAt(UInt64)

Gibt einen Ausgabedatenstrom an einer angegebenen Position in einem Stream zurück.

ReadAsync(IBuffer, UInt32, InputStreamOptions)

Gibt ein asynchrones Byteleseobjekt zurück.

Seek(UInt64)

Legt die Position des Streams auf den angegebenen Wert fest.

WriteAsync(IBuffer)

Schreibt Daten asynchron in einen sequenziellen Stream.

Gilt für: