LumiSoft Mail Server User API
ReadPeriodTerminated Method (storeStream, maxSize, exceededAction)
Namespaces > LumiSoft.Net.IO > StreamHelper > ReadPeriodTerminated(Stream, Int32, SizeExceededAction)
Reads period terminated data from source stream. Reads data while gets single period on line, what is data terminator.
Syntax

C# | Visual Basic | Managed C++

    public int ReadPeriodTerminated (
    	Stream storeStream,
    	int maxSize,
    	SizeExceededAction exceededAction
    )

    Public Function ReadPeriodTerminated ( _
    	storeStream As Stream, _
    	maxSize As Integer, _
    	exceededAction As SizeExceededAction _
    ) As Integer

    public:
    int ReadPeriodTerminated (
    	Stream^ storeStream,
    	int maxSize,
    	SizeExceededAction exceededAction
    )

Parameters

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 size exceeded.

Return Value
Returns number of bytes written to storeStream.
Exceptions

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.
IncompleteDataException | Raised when source stream was reached end of stream and data is not period terminated.

Assembly: LumiSoft.Net Version: 2.0.2636.18419 (Module: LumiSoft.Net)