Class MarshaledResponse.Copier
java.lang.Object
com.soklet.MarshaledResponse.Copier
- Enclosing class:
MarshaledResponse
Builder used to copy instances of
MarshaledResponse via MarshaledResponse.copy().
This class is intended for use by a single thread.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbody(@Nullable ByteBuffer byteBuffer) body(@NonNull FileChannel fileChannel, @NonNull Long offset, @NonNull Long count, @NonNull Boolean closeOnComplete) cookies(@Nullable Set<@NonNull ResponseCookie> cookies) finish()statusCode(@NonNull Integer statusCode) Removes the response body from this copier.
-
Method Details
-
statusCode
-
headers
-
headers
-
cookies
-
cookies
public @NonNull MarshaledResponse.Copier cookies(@NonNull Consumer<Set<@NonNull ResponseCookie>> cookiesConsumer) -
body
-
body
-
body
-
body
-
body
-
body
-
withoutBody
Removes the response body from this copier.If the current body owns a caller-supplied
FileChannel, the channel is closed before it is removed. Path-backed file bodies are lazy and do not hold open resources at this point.- Returns:
- this copier
-
finish
-