OracleDataReader.GetBytes(Int32, Int64, Byte[], Int32, Int32) メソッド

定義

指定されたバッファー オフセットから始まる、指定した列オフセットからバッファーへのバイト ストリームを配列として読み取ります。

public:
 virtual long GetBytes(int i, long fieldOffset, cli::array <System::Byte> ^ buffer2, int bufferoffset, int length);
public:
 override long GetBytes(int i, long fieldOffset, cli::array <System::Byte> ^ buffer2, int bufferoffset, int length);
public long GetBytes(int i, long fieldOffset, byte[] buffer2, int bufferoffset, int length);
public override long GetBytes(int i, long fieldOffset, byte[] buffer2, int bufferoffset, int length);
abstract member GetBytes : int * int64 * byte[] * int * int -> int64
override this.GetBytes : int * int64 * byte[] * int * int -> int64
override this.GetBytes : int * int64 * byte[] * int * int -> int64
Public Function GetBytes (i As Integer, fieldOffset As Long, buffer2 As Byte(), bufferoffset As Integer, length As Integer) As Long
Public Overrides Function GetBytes (i As Integer, fieldOffset As Long, buffer2 As Byte(), bufferoffset As Integer, length As Integer) As Long

パラメーター

i
Int32

0 から始まる列の序数。

fieldOffset
Int64

読み取り操作を開始するフィールド内のインデックス。

buffer2
Byte[]

バイトストリームを読み取るバッファー。

bufferoffset
Int32

書き込み操作を開始 buffer2 インデックス。

length
Int32

読み取るバイト数。

返品

読み取られた実際のバイト数。

実装

注釈

GetBytes は、フィールド内の使用可能なバイト数を返します。 ほとんどの場合、これはフィールドの正確な長さです。 ただし、 GetBytes がフィールドからバイトを取得するために既に使用されている場合は、返される数がフィールドの実際の長さよりも小さい場合があります。 たとえば、 OracleDataReader が大きなデータ構造をバッファーに読み取る場合などです。 詳細については、SequentialAccessCommandBehavior設定を参照してください。

null 値のバッファーを渡すと、 GetBytes はフィールドの長さをバイト単位で返します。

適用対象