Package com.azure.core.http.rest
Class StreamResponse
- All Implemented Interfaces:
Response<Flux<ByteBuffer>>,Closeable,AutoCloseable
REST response with a streaming content.
-
Constructor Summary
ConstructorsConstructorDescriptionStreamResponse(HttpRequest request, int statusCode, HttpHeaders headers, Flux<ByteBuffer> value) Creates aStreamResponse. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Disposes the connection associated with thisStreamResponse.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 Details
-
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 Details
-
getValue
The content of the HTTP response as a stream ofbyte buffers.- Specified by:
getValuein interfaceResponse<Flux<ByteBuffer>>- Overrides:
getValuein 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-