Package play.http

Class HttpEntity.Chunked

  • Enclosing class:
    HttpEntity

    public static final class HttpEntity.Chunked
    extends HttpEntity
    A chunked entity, backed by a source of chunks.
    • Constructor Detail

      • Chunked

        public Chunked​(Source<play.api.http.HttpChunk,​?> chunks,
                       Optional<String> contentType)
    • Method Detail

      • chunks

        public Source<play.api.http.HttpChunk,​?> chunks()
      • isKnownEmpty

        public boolean isKnownEmpty()
        Specified by:
        isKnownEmpty in class HttpEntity
        Returns:
        Whether the entity is known to be empty or not.
      • as

        public HttpEntity as​(String contentType)
        Specified by:
        as in class HttpEntity
        Parameters:
        contentType - the content type to use, i.e. "text/html".
        Returns:
        Return the entity as the given content type.
      • asScala

        public play.api.http.HttpEntity asScala()
        Specified by:
        asScala in class HttpEntity