System.Classes.TStream.ReadData
Delphi
function ReadData( Buffer: Pointer; Count: NativeInt): NativeInt; overload; inline;
function ReadData(const Buffer: TBytes; Count: NativeInt): NativeInt; overload; inline;
function ReadData(var Buffer: Boolean): NativeInt; overload; inline;
function ReadData(var Buffer: Boolean; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: AnsiChar): NativeInt; overload; inline;
function ReadData(var Buffer: AnsiChar; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Char): NativeInt; overload; inline;
function ReadData(var Buffer: Char; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int8): NativeInt; overload; inline;
function ReadData(var Buffer: Int8; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt8): NativeInt; overload; inline;
function ReadData(var Buffer: UInt8; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int16): NativeInt; overload; inline;
function ReadData(var Buffer: Int16; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt16): NativeInt; overload; inline;
function ReadData(var Buffer: UInt16; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int32): NativeInt; overload; inline;
function ReadData(var Buffer: Int32; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt32): NativeInt; overload; inline;
function ReadData(var Buffer: UInt32; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Int64): NativeInt; overload; inline;
function ReadData(var Buffer: Int64; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: UInt64): NativeInt; overload; inline;
function ReadData(var Buffer: UInt64; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Single): NativeInt; overload; inline;
function ReadData(var Buffer: Single; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Double): NativeInt; overload; inline;
function ReadData(var Buffer: Double; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: Extended): NativeInt; overload; inline;
function ReadData(var Buffer: Extended; Count: NativeInt): NativeInt; overload;
function ReadData(var Buffer: TExtended80Rec): NativeInt; overload; inline;
function ReadData(var Buffer: TExtended80Rec; Count: NativeInt): NativeInt; overload;
function ReadData<T>(var Buffer: T): NativeInt; overload; inline;
function ReadData<T>(var Buffer: T; Count: NativeInt): NativeInt; overload;
C++
System::NativeInt __fastcall ReadData(void * Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(const System::Sysutils::TBytes Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(bool &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(bool &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(char &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(char &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::WideChar &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::WideChar &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::Int8 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::Int8 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::UInt8 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::UInt8 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::Int16 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::Int16 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::UInt16 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::UInt16 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::Int32 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::Int32 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::UInt32 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::UInt32 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(__int64 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(__int64 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(unsigned __int64 &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(unsigned __int64 &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(float &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(float &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(double &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(double &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::Extended &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::Extended &Buffer, System::NativeInt Count)/* overload */;
System::NativeInt __fastcall ReadData(System::TExtended80Rec &Buffer)/* overload */;
System::NativeInt __fastcall ReadData(System::TExtended80Rec &Buffer, System::NativeInt Count)/* overload */;
template<typename T> System::NativeInt __fastcall ReadData(T &Buffer)/* overload */;
template<typename T> System::NativeInt __fastcall ReadData(T &Buffer, System::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 を呼び出して実際の読み取りを行います。