Class FileEncoder
java.lang.Object
io.micronaut.servlet.http.encoders.FileEncoder
- All Implemented Interfaces:
ServletResponseEncoder<File>
Handles
File
.- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
encode
(@NonNull ServletExchange<?, ?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @NonNull File value) Encode the given value.
-
Constructor Details
-
FileEncoder
-
FileEncoder
public FileEncoder()
-
-
Method Details
-
getResponseType
- Specified by:
getResponseType
in interfaceServletResponseEncoder<File>
- Returns:
- The response type.
-
encode
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> encode(@NonNull @NonNull ServletExchange<?, ?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @NonNull @NonNull File value) Description copied from interface:ServletResponseEncoder
Encode the given value.- Specified by:
encode
in interfaceServletResponseEncoder<File>
- Parameters:
exchange
- The changeannotationMetadata
- The annotation metadata declared on the methodvalue
- The value to encode- Returns:
- A publisher that emits completes with the response once the value has been encoded
-