System.Classes.TStream.ReadData
Delphi
function ReadData( Buffer: Pointer; Count: NativeInt): NativeInt; overload;
function ReadData(const Buffer: TBytes; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Boolean): NativeInt; overload;
function ReadData(var Buffer: Boolean; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: AnsiChar): NativeInt; overload;
function ReadData(var Buffer: AnsiChar; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Char): NativeInt; overload;
function ReadData(var Buffer: Char; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int8): NativeInt; overload;
function ReadData(var Buffer: Int8; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt8): NativeInt; overload;
function ReadData(var Buffer: UInt8; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int16): NativeInt; overload;
function ReadData(var Buffer: Int16; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt16): NativeInt; overload;
function ReadData(var Buffer: UInt16; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int32): NativeInt; overload;
function ReadData(var Buffer: Int32; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt32): NativeInt; overload;
function ReadData(var Buffer: UInt32; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int64): NativeInt; overload;
function ReadData(var Buffer: Int64; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt64): NativeInt; overload;
function ReadData(var Buffer: UInt64; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Single): NativeInt; overload;
function ReadData(var Buffer: Single; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Double): NativeInt; overload;
function ReadData(var Buffer: Double; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Extended): NativeInt; overload;
function ReadData(var Buffer: Extended; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: TExtended80Rec): NativeInt; overload;
function ReadData(var Buffer: TExtended80Rec; Count: NativeInt): NativeInt; overload;
function ReadData<T>(var Buffer: T): NativeInt; overload;
function ReadData<T>(var Buffer: T; Count: NativeInt): NativeInt; overload;
C++
NativeInt __fastcall ReadData(void * Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(const System::DynamicArray<System::Byte> Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(bool &Buffer)/* overload */;
NativeInt __fastcall ReadData(bool &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(char &Buffer)/* overload */;
NativeInt __fastcall ReadData(char &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(System::WideChar &Buffer)/* overload */;
NativeInt __fastcall ReadData(System::WideChar &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(System::Int8 &Buffer)/* overload */;
NativeInt __fastcall ReadData(System::Int8 &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(System::Byte &Buffer)/* overload */;
NativeInt __fastcall ReadData(System::Byte &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(short &Buffer)/* overload */;
NativeInt __fastcall ReadData(short &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(System::Word &Buffer)/* overload */;
NativeInt __fastcall ReadData(System::Word &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(int &Buffer)/* overload */;
NativeInt __fastcall ReadData(int &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(unsigned &Buffer)/* overload */;
NativeInt __fastcall ReadData(unsigned &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(__int64 &Buffer)/* overload */;
NativeInt __fastcall ReadData(__int64 &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(unsigned __int64 &Buffer)/* overload */;
NativeInt __fastcall ReadData(unsigned __int64 &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(float &Buffer)/* overload */;
NativeInt __fastcall ReadData(float &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(double &Buffer)/* overload */;
NativeInt __fastcall ReadData(double &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(System::Extended &Buffer)/* overload */;
NativeInt __fastcall ReadData(System::Extended &Buffer, NativeInt Count)/* overload */;
NativeInt __fastcall ReadData(System::TExtended80Rec &Buffer)/* overload */;
NativeInt __fastcall ReadData(System::TExtended80Rec &Buffer, NativeInt Count)/* overload */;
template<typename T> NativeInt __fastcall ReadData(T &Buffer)/* overload */;
template<typename T> NativeInt __fastcall ReadData(T &Buffer, NativeInt Count)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TStream |
説明
ストリームから Buffer
へ、最大 Count
バイト(ただし SizeOf(Buffer)
を超えない)を読み取るためのメソッド群です。
ReadData は、ストリームから読み取るバイト数が固定であるとは限らない場合に使用します。
ReadData が動作するアルゴリズムは以下のとおりです。
- ReadData に
Count
パラメータがない場合、ReadData はSizeOf(Buffer)
バイトの読み取りを試み、ストリーム内の現在位置を転送したバイト数だけ先に進めます。ReadData は読み取ったバイト数を返します。 - ReadData に
Count
パラメータがある場合、
ReadData メソッドでは、Read を呼び出して実際の読み取りを行います。