Interface HttpResponseEntity


public interface HttpResponseEntity
Defines an interface of an HTTP response message 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.
    • contentStream

      InputStream contentStream() throws IOException
      Returns the content InputStream of the entity. If you don't consume the entire content, make sure you always close the InputStream.
      Returns:
      An InputStream.
      Throws:
      IOException - If an IO error occurred.