Package com.azure.core.http.rest
Class StreamResponse
- java.lang.Object
-
- com.azure.core.http.rest.SimpleResponse<Flux<ByteBuffer>>
-
- com.azure.core.http.rest.StreamResponse
-
- All Implemented Interfaces:
Response<Flux<ByteBuffer>>
,Closeable
,AutoCloseable
public final class StreamResponse extends SimpleResponse<Flux<ByteBuffer>> implements Closeable
REST response with a streaming content.
-
-
Constructor Summary
Constructors Constructor Description StreamResponse(HttpRequest request, int statusCode, HttpHeaders headers, Flux<ByteBuffer> value)
Creates aStreamResponse
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Disposes the connection associated with thisStreamResponse
.Flux<ByteBuffer>
getValue()
The content of the HTTP response as a stream ofbyte buffers
.-
Methods inherited from class com.azure.core.http.rest.SimpleResponse
getHeaders, getRequest, getStatusCode
-
-
-
-
Constructor Detail
-
StreamResponse
public StreamResponse(HttpRequest request, int statusCode, HttpHeaders headers, Flux<ByteBuffer> value)
Creates aStreamResponse
.- Parameters:
request
- The request which resulted in this response.statusCode
- The status code of the HTTP response.headers
- The headers of the HTTP response.value
- The content of the HTTP response.
-
-
Method Detail
-
getValue
public Flux<ByteBuffer> getValue()
The content of the HTTP response as a stream ofbyte buffers
.- Specified by:
getValue
in interfaceResponse<Flux<ByteBuffer>>
- Overrides:
getValue
in classSimpleResponse<Flux<ByteBuffer>>
- Returns:
- The content of the HTTP response as a stream of
byte buffers
.
-
close
public void close()
Disposes the connection associated with thisStreamResponse
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-