Discuss this help topic in SecureBlackbox Forum

TElMessagePart.SetData

TElMessagePart     See also     


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


Sets contents of the part.

Declaration

[C#]
    void SetData(System.IO.Stream Stream, int DataSize, bool bMakeCopy);
    void SetData(string wsData);
    void SetData(byte[] Buffer, int Offset, int Count);

[VB.NET]
    Sub SetData(ByVal Stream As System.IO.Stream, ByVal DataSize As Integer, ByVal bMakeCopy As Boolean)
    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)

[Java]
    void setData(TElStream Stream, int DataSize, boolean bMakeCopy);
    void setData(byte[] value);
    void setData(byte[] Buffer, int Offset, int Count);
    void setData(String wsData);

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.
  • value -

Description

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

See also:     GetData     SaveDataToFile     SaveDataToStream    

Discuss this help topic in SecureBlackbox Forum