Package ru.tinkoff.kora.http.client.ok
Class OkHttpResponseBody
java.lang.Object
ru.tinkoff.kora.http.client.ok.OkHttpResponseBody
- All Implemented Interfaces:
Closeable,AutoCloseable,Flow.Publisher<ByteBuffer>,ru.tinkoff.kora.http.common.body.HttpBody,ru.tinkoff.kora.http.common.body.HttpBodyInput
public final class OkHttpResponseBody
extends Object
implements ru.tinkoff.kora.http.common.body.HttpBodyInput
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompletionStage<byte[]>voidclose()longvoidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ru.tinkoff.kora.http.common.body.HttpBody
getFullContentIfAvailable
-
Constructor Details
-
OkHttpResponseBody
public OkHttpResponseBody(okhttp3.ResponseBody body)
-
-
Method Details
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceru.tinkoff.kora.http.common.body.HttpBody
-
contentType
- Specified by:
contentTypein interfaceru.tinkoff.kora.http.common.body.HttpBody
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>- Specified by:
subscribein interfaceru.tinkoff.kora.http.common.body.HttpBodyInput
-
asInputStream
- Specified by:
asInputStreamin interfaceru.tinkoff.kora.http.common.body.HttpBodyInput
-
asBufferStage
- Specified by:
asBufferStagein interfaceru.tinkoff.kora.http.common.body.HttpBodyInput
-
asArrayStage
- Specified by:
asArrayStagein interfaceru.tinkoff.kora.http.common.body.HttpBodyInput
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-