PowerTCP Mail for .NET
Read() Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > SegmentedStream Class > Read Method : Read() Method




Read data from the stream into a string.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Read() As String
Visual Basic (Usage)Copy Code
Dim instance As SegmentedStream
Dim value As String
 
value = instance.Read()
C# 
public string Read()
Managed Extensions for C++ 
public: string* Read(); 
C++/CLI 
public:
String^ Read(); 

Return Value

A string containing the data read from the stream.

Exceptions

ExceptionDescription
System.IO.IOExceptionThrown when the stream is not Readable.
System.ArgumentNullExceptionThrown when the receiving buffer is null.
System.ArgumentOutOfRangeExceptionThrown when the offset is less than zero or when count is less than or equal to zero.
System.ArgumentExceptionThrown when (offset + count) > buffer.Length.

Remarks

This method will block (for ReceiveTimeout) until at least 1 byte is available for reading, or the connection is closed by the server, in which case an empty string is returned. The Charset property is used to convert from bytes to unicode characters, which allows unicode characters to be passed over the network.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.