com.aspose.html.net

Class Content

  • All Implemented Interfaces:
    com.aspose.html.internal.ms.System.IDisposable
    Direct Known Subclasses:
    ByteArrayContent, MultipartContent, StreamContent


    public abstract class Content
    extends Object
    implements com.aspose.html.internal.ms.System.IDisposable

    Represents a base class for an HTTP entity body and content headers.

    • Field Detail

      • DEFAULT_STRING_ENCODING

        public static final com.aspose.html.internal.ms.System.Text.Encoding DEFAULT_STRING_ENCODING
      • DEFAULT_HTTP_ENCODING

        public static final com.aspose.html.internal.ms.System.Text.Encoding DEFAULT_HTTP_ENCODING
    • Method Detail

      • getHeaders

        public ContentHeaders getHeaders()

        Gets the HTTP content headers.

        Value: The headers.
      • readAsStream

        public com.aspose.html.internal.ms.System.IO.Stream readAsStream()

        Serialize the HTTP content and return a stream that represents the content.

        Returns:
        Serialized stream that represents the content
      • readAsByteArray

        public byte[] readAsByteArray()

        Serialize the HTTP content and return a byte array that represents the content.

        Returns:
        Serialized byte array that represents the content
      • readAsString

        public String readAsString()

        Serialize the HTTP content and return a string that represents the content.

        Returns:
        Serialized string that represents the content
      • dispose

        public void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.html.internal.ms.System.IDisposable