[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#fcl)

# TStringStream.Read

Reads from the stream.

## Declaration

`public function TStringStream.Read(`
`var Buffer;`
`Count: LongInt`
`):LongInt; override;`

## Description

Read implements the abstract Read from TStream. It tries to read Count bytes into Buffer. It returns the number of bytes actually read. The position of the stream is advanced with the number of bytes actually read; When the reading has reached the end of the DataString, then the reading stops, i.e. it is not possible to read beyond the end of the datastring.

## See also

TStream.Read |  | Reads data from the stream to a buffer and returns the number of bytes read.
TStringStream.Write |  | Write implements the abstract TStream.Write method.
TStringStream.DataString |  | Contains the contents of the stream in string form