IsolatedStorageFileStream.Read メソッド

定義

オーバーロード

名前 説明
Read(Byte[], Int32, Int32)

現在バッファーに格納されている IsolatedStorageFileStream オブジェクトからバイト配列にバイトをコピーします。

Read(Span<Byte>)

現在バッファーに格納されている IsolatedStorageFileStream オブジェクトからバイト スパンにバイトをコピーします。

Read(Byte[], Int32, Int32)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

現在バッファーに格納されている IsolatedStorageFileStream オブジェクトからバイト配列にバイトをコピーします。

public:
 override int Read(cli::array <System::Byte> ^ buffer, int offset, int count);
public override int Read(byte[] buffer, int offset, int count);
override this.Read : byte[] * int * int -> int
Public Overrides Function Read (buffer As Byte(), offset As Integer, count As Integer) As Integer

パラメーター

buffer
Byte[]

データを書き込むバッファー。

offset
Int32

書き込みを開始するバッファー内のオフセット。

count
Int32

読み取る最大バイト数。

返品

bufferに読み込まれる合計バイト数。 この値は、現在使用できないバイト数の場合は要求されたバイト数より小さく、ストリームの末尾に達した場合は 0 を指定できます。

注釈

buffer パラメーターには、Buffer クラスのインスタンス、または ByteSByteCharInt16Int32Int64UInt16UInt32UInt64Single、またはDoubleのいずれかの型の配列を指定できます。

読み取り操作が成功した場合、ストリームの現在位置は読み取られたバイト数だけ進みます。 例外が発生した場合、ストリームの現在位置は変更されません。

Read メソッドは、実際の型に関係なく、buffer パラメーターをバイト ブロックとして扱います。 同様に、 offset パラメーターと count パラメーターは常にバイト単位で指定されます。 バイト配列以外の buffer パラメーターの場合、 offset または countの正しい値を形成するには、要素インデックスまたは要素の数にバイト単位の要素サイズを乗算する必要があります。

Read メソッドは、ストリームの末尾に達した場合にのみ 0 を返します。 それ以外の場合は、 Read 常にストリームから少なくとも 1 バイトを読み取ってから戻ります。 IsolatedStorageFileStreamの呼び出し時にRead オブジェクトからデータが使用できない場合、メソッドは少なくとも 1 バイトのデータが返されるまでブロックされます。

適用対象

Read(Span<Byte>)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

現在バッファーに格納されている IsolatedStorageFileStream オブジェクトからバイト スパンにバイトをコピーします。

public:
 override int Read(Span<System::Byte> buffer);
public override int Read(Span<byte> buffer);
override this.Read : Span<byte> -> int
Public Overrides Function Read (buffer As Span(Of Byte)) As Integer

パラメーター

buffer
Span<Byte>

データを書き込むバッファー。

返品

bufferに読み込まれる合計バイト数。 この値は、現在使用できないバイト数の場合は要求されたバイト数より小さく、ストリームの末尾に達した場合は 0 を指定できます。

適用対象