Reads header from source stream and stores to the specified stream. Reads header data while
gets blank line, what is header terminator. For example this method can be used for reading
mail,http,sip, ... headers.
| C# | Visual Basic | Managed C++ |
public int ReadHeader ( Stream storeStream, int maxSize, SizeExceededAction exceededAction )
Public Function ReadHeader ( _ storeStream As Stream, _ maxSize As Integer, _ exceededAction As SizeExceededAction _ ) As Integer
public: int ReadHeader ( Stream^ storeStream, int maxSize, SizeExceededAction exceededAction )
- storeStream (Stream)
- Stream where to store readed data.
- maxSize (Int32)
- Maximum number of bytes to read.
- exceededAction (SizeExceededAction)
- Specifies how this method behaves when maximum line or data size exceeded.
Returns number of bytes written to storeStream.
| Exception | Condition |
|---|---|
| ArgumentNullException | Raised when storeStream is null. |
| ArgumentException | Raised when maxSize less than 1. |
| InvalidOperationException | Raised when there already is pending read operation. |
| LineSizeExceededException | Raised when maximum allowed line size has exceeded. |
| DataSizeExceededException | Raised when maximum allowed data size has exceeded. |
Assembly: LumiSoft.Net Version: 2.0.2636.18419 (Module: LumiSoft.Net)