Discuss this help topic in SecureBlackbox Forum

TElMessagePart.SetData

TElMessagePart     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Sets contents of the part.

Declaration

[C#/Java]
    void SetData(TElNativeStream Stream, int DataSize /* = 2147483647 */, bool bMakeCopy /* = False */);
    void SetData([in] string wsData);
    void SetData([in] byte[] Buffer, int Offset, int Count);

[VB.NET]
    Sub SetData(ByVal Stream As TElNativeStream, ByVal DataSize As Integer = 2147483647, ByVal bMakeCopy As Boolean = False)
    Sub SetData(ByVal wsData As String)
    Sub SetData(ByVal Buffer As Byte(), ByVal Offset As Integer, ByVal Count As Integer)

[Pascal]
    procedure SetData(Stream: TElNativeStream; DataSize: Integer = MaxInt; bMakeCopy: Boolean = False);
    procedure SetData(const wsData: TString);
    procedure SetData(const Buffer: TBytes; Offset, Count: Integer);

[C++]
    void SetData(TStream &Stream, int32_t DataSize, bool bMakeCopy);
    void SetData(TStream *Stream, int32_t DataSize, bool bMakeCopy);
    void SetData(const sb_u16string &wsData);
    void SetData(const std::wstring &wsData);
    void SetData(const std::vector<uint8_t> &Buffer, int32_t Offset, int32_t Count);

[PHP]
    void SetData(TStream $Stream, integer $DataSize, bool $bMakeCopy)
    void SetData(string $wsData)
    void SetData(array of byte|string|NULL $Buffer, integer $Offset, integer $Count)

Parameters

  • Stream - source stream with data.
  • DataSize - size of data in bytes.
  • bMakeCopy - defines if the data is copied at once:
    True - the data will be copied;
    False - the data will be cached and then loaded when it is necessary.
    Default value is false.
  • wsData - string with data.
  • Buffer - source buffer with data.
  • Offset - data starting position.
  • Count - Optional parameter that specifies the number of bytes to be read. If this parameter is zero, the whole buffer (from offset position till the end) is read.

Description

    Use this method to read the data from stream or buffer.

See also:     GetData     SaveDataToFile     SaveDataToStream    

Discuss this help topic in SecureBlackbox Forum