PrintQueueStream.Read(Byte[], Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從串流讀取一串位元組,並將讀取的位元組數推進讀寫位置。
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 值(偏移量 + 計數 - 1)會被從來源讀取的位元組取代。