Class Content
Namespace: Aspose.Html.Net
Assembly: Aspose.HTML.dll (25.7.0)
Represents a base class for an HTTP entity body and content headers.
[ComVisible(true)]
public abstract class Content : IDisposableInheritance
Derived
ByteArrayContent , MultipartContent , StreamContent
Implements
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Content()
Initializes a new instance of the Aspose.Html.Net.Content class.
protected Content()Properties
Headers
Gets the HTTP content headers.
public ContentHeaders Headers { get; }Property Value
Methods
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)Parameters
disposing bool
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()ReadAsByteArray()
Serialize the HTTP content and return a byte array that represents the content.
public byte[] ReadAsByteArray()Returns
byte []
Serialized byte array that represents the content
ReadAsStream()
Serialize the HTTP content and return a stream that represents the content.
public Stream ReadAsStream()Returns
Serialized stream that represents the content
ReadAsString()
Serialize the HTTP content and return a string that represents the content.
public string ReadAsString()Returns
Serialized string that represents the content
SerializeToStream(Stream)
Serialize the content to a specified stream.
protected abstract void SerializeToStream(Stream stream)Parameters
stream Stream
The stream.