Class BinaryDataResponse
java.lang.Object
co.elastic.clients.transport.endpoints.BinaryDataResponse
- All Implemented Interfaces:
BinaryResponse,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases any resources associated with this response.content()The response body.longThe content length, or-1if not known.The response content type.static BinaryDataResponse
-
Constructor Details
-
BinaryDataResponse
-
-
Method Details
-
contentType
Description copied from interface:BinaryResponseThe response content type. If not known, defaults toapplication/octet-stream.- Specified by:
contentTypein interfaceBinaryResponse
-
contentLength
public long contentLength()Description copied from interface:BinaryResponseThe content length, or-1if not known.- Specified by:
contentLengthin interfaceBinaryResponse
-
content
Description copied from interface:BinaryResponseThe response body. This method can be called only once and will throw anIllegalStateExceptionon subsequent calls.Calling
InputStream.close()on the result has the same effect as callingBinaryResponse.close()on this object.- Specified by:
contentin interfaceBinaryResponse- Throws:
IOException- if the stream could not be created
-
close
Description copied from interface:BinaryResponseReleases any resources associated with this response.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBinaryResponse- Throws:
IOException
-
of
-