Diffusion .NET Client Library
6.1.5
|
Represents data content. More...
Public Member Functions | |
byte[] | ToBytes () |
Returns the content as an array of bytes. More... | |
string | AsString () |
Returns the content as a string. More... | |
Public Member Functions inherited from PushTechnology.ClientInterface.Data.IBytes | |
Stream | AsInputStream () |
Returns the data as a read-only stream. More... | |
byte[] | ToByteArray () |
Returns a copy of the data as a byte array. More... | |
void | CopyTo (Stream outputStream) |
Writes the data to an output stream. More... | |
Properties | |
ContentEncoding | Encoding [get] |
Returns the content encoding. More... | |
Properties inherited from PushTechnology.ClientInterface.Data.IBytes | |
int | Length [get] |
Returns the length of the data in bytes. More... | |
Represents data content.
Content can represent the state of a topic or can be used to update a topic. Content may also form the body of a message sent to or from a client.
Content is immutable and can only be created using a IContentBuilder{TB} or by using convenience methods on IContentFactory.
Specialised subTypes of the builder are available for special data formats.
Content is essentially an array of bytes which can be formatted in various ways using builders or interpreted using readers.
Since: 5.0
NOTE : This interface is being phased out in favor of specific data types. The only remaining places where it must be used are in some of the IMessaging methods and in the Topics.Fetch methods. In all other cases its use should be avoided.
string PushTechnology.ClientInterface.Client.Content.IContent.AsString | ( | ) |
Returns the content as a string.
The byte content is converted to a string using UTF-8 encoding.
byte [] PushTechnology.ClientInterface.Client.Content.IContent.ToBytes | ( | ) |
Returns the content as an array of bytes.
This actually returns the internal byte array which must not be altered. If this data is to be manipulated in any way, it must first be copied.
|
get |
Returns the content encoding.
This is the encoding that will be used for the content when transmitted over a compatible communications link. For inbound content this indicates the encoding that the content arrived with.