Table of Contents

Class OdfDirectIoWritableStream

Namespace
OdfKit.Core
Assembly
OdfKit.dll

Provides a write-only stream optimized for Direct I/O file access when the platform supports it. 提供在平台支援時使用 Direct I/O 檔案存取最佳化的唯寫資料流。

public sealed class OdfDirectIoWritableStream : Stream, IDisposable, IAsyncDisposable
Inheritance
OdfDirectIoWritableStream
Implements
Inherited Members

Constructors

OdfDirectIoWritableStream(string)

Initializes a new instance of the OdfDirectIoWritableStream class. 初始化 OdfDirectIoWritableStream 類別的新執行個體。

public OdfDirectIoWritableStream(string filePath)

Parameters

filePath string

The path of the file to write. / 要寫入的檔案路徑。

Properties

CanRead

Provides the CanRead member. 提供 CanRead 成員。

public override bool CanRead { get; }

Property Value

bool

CanSeek

Provides the CanSeek member. 提供 CanSeek 成員。

public override bool CanSeek { get; }

Property Value

bool

CanWrite

Provides the CanWrite member. 提供 CanWrite 成員。

public override bool CanWrite { get; }

Property Value

bool

Length

Performs length. 執行 Length。

public override long Length { get; }

Property Value

long

Position

Gets the number of bytes accepted by the stream. 取得資料流已接受的位元組數。

public override long Position { get; set; }

Property Value

long

Methods

Dispose(bool)

Releases unmanaged resources. 釋放非受控資源。

protected override void Dispose(bool disposing)

Parameters

disposing bool

Flush()

Performs flush. 執行 Flush。

public override void Flush()

Read(byte[], int, int)

Performs the Read operation. 執行 Read 作業。

public override int Read(byte[] buffer, int offset, int count)

Parameters

buffer byte[]
offset int
count int

Returns

int

Seek(long, SeekOrigin)

Performs seek. 執行 Seek。

public override long Seek(long offset, SeekOrigin origin)

Parameters

offset long
origin SeekOrigin

Returns

long

SetLength(long)

Sets length. 設定 Length。

public override void SetLength(long value)

Parameters

value long

Write(byte[], int, int)

Performs the Write operation. 執行 Write 作業。

public override void Write(byte[] buffer, int offset, int count)

Parameters

buffer byte[]
offset int
count int

WriteAsync(byte[], int, int, CancellationToken)

Writes async. 寫入 Async。

public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)

Parameters

buffer byte[]
offset int
count int
cancellationToken CancellationToken

Returns

Task