PrintQueueStream.Read(Byte[], Int32, Int32) 方法

定義

從該資料流讀取位元組序列,並依讀取的位元組數將資料流中的讀取/寫入位置往前移。

public:
 override int Read(cli::array <System::Byte> ^ buffer, int offset, int count);
[System.Security.SecurityCritical]
public override int Read (byte[] buffer, int offset, int count);
public override int Read (byte[] buffer, int offset, int count);
[<System.Security.SecurityCritical>]
override this.Read : byte[] * int * int -> int
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

自該資料流讀取的最大位元組數。

傳回

保存讀取至緩衝區之位元組總數的 Int32

屬性

備註

如果目前無法使用許多位元組,傳回值可以小於要求的位元元組數目;如果讀取/寫入位置位於數據流結尾,則數位可以是零 (0) 。

當這個方法傳回時, buffer 會包含指定的位元組陣列,以及介於和 (offset + count 之間的 offset 值 - 1) 會由從來源讀取的位元組取代。

適用於