LumiSoft Mail Server User API
WriteAll Method (stream, maxSize)
Namespaces > LumiSoft.Net.IO > StreamHelper > WriteAll(Stream, Int32)
Writes all stream data to source stream.
Syntax

C# | Visual Basic | Managed C++

    public int WriteAll (
    	Stream stream,
    	int maxSize
    )

    Public Function WriteAll ( _
    	stream As Stream, _
    	maxSize As Integer _
    ) As Integer

    public:
    int WriteAll (
    	Stream^ stream,
    	int maxSize
    )

Parameters

stream (Stream)
  Stream which data to write.
maxSize (Int32)
  Maximum muber of bytes to read from stream and write source stream.

Return Value
Returns number of bytes written to source stream.
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | Raised when stream is null.
InvalidOperationException | Raised when there already is pending write operation.
DataSizeExceededException | Raised when stream stream has more data than specified by maxSize.

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