Package ru.tinkoff.kora.http.common.body
Class EmptyHttpBody
java.lang.Object
ru.tinkoff.kora.http.common.body.EmptyHttpBody
- All Implemented Interfaces:
Closeable,AutoCloseable,Flow.Publisher<ByteBuffer>,HttpBody,HttpBodyInput,HttpBodyOutput
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCompletionStage<byte[]>voidclose()longvoidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber) voidwrite(OutputStream os)
-
Field Details
-
INSTANCE
-
-
Method Details
-
getFullContentIfAvailable
- Specified by:
getFullContentIfAvailablein interfaceHttpBody- Returns:
- Русский: Возвращает полное тело запроса если оно доступно, иначе null
English: Returns the full body of the request if available, otherwise null
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceHttpBody- Specified by:
contentLengthin interfaceHttpBodyOutput- Returns:
- Русский: Возвращает длину тела запроса
English: Returns the length of the body of the request
-
contentType
- Specified by:
contentTypein interfaceHttpBody- Specified by:
contentTypein interfaceHttpBodyOutput- Returns:
- Русский: Возвращает тип тела запроса как значения HTTP заголовка
English: Returns request body type as HTTP header values
Пример / Example:application/json
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>- Specified by:
subscribein interfaceHttpBodyInput- Specified by:
subscribein interfaceHttpBodyOutput
-
asBufferStage
- Specified by:
asBufferStagein interfaceHttpBodyInput
-
asArrayStage
- Specified by:
asArrayStagein interfaceHttpBodyInput
-
write
- Specified by:
writein interfaceHttpBodyOutput- Throws:
IOException
-
asInputStream
- Specified by:
asInputStreamin interfaceHttpBodyInput
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-