Interface HttpRequestEntity


public interface HttpRequestEntity
Defines an interface of an HTTP message request body entity.
  • Method Details

    • contentType

      org.dmfs.jems.optional.Optional<MediaType> contentType()
      Returns the MediaType of the entity, if known.
      Returns:
      The Optional content MediaType.
    • contentLength

      org.dmfs.jems.optional.Optional<Long> contentLength()
      Returns the length of the content, if known.
      Returns:
      The Optional content length.
    • writeContent

      void writeContent(OutputStream out) throws IOException
      Writes the content to the given OutputStream. Note that the stream is property of the caller and must not be closed by this method.
      Parameters:
      out - The OutputStream to write to.
      Throws:
      IOException