Class FileEncoder

java.lang.Object
io.micronaut.servlet.http.encoders.FileEncoder
All Implemented Interfaces:
ServletResponseEncoder<File>

@Singleton @Deprecated(forRemoval=true, since="5.1.0") public class FileEncoder extends Object implements ServletResponseEncoder<File>
Deprecated, for removal: This API element is subject to removal in a future version.
Now unused, use a normal ResponseBodyWriter
Handles File.
Since:
1.0.0
Author:
graemerocher
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    FileEncoder(@Nullable ServletConfiguration servletConfiguration)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
    encode(@NonNull ServletExchange<?,?> exchange, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @NonNull File value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Encode the given value.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileEncoder

      @Inject public FileEncoder(@Nullable @Nullable ServletConfiguration servletConfiguration)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • FileEncoder

      public FileEncoder()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getResponseType

      public Class<File> getResponseType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getResponseType in interface ServletResponseEncoder<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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ServletResponseEncoder
      Encode the given value.
      Specified by:
      encode in interface ServletResponseEncoder<File>
      Parameters:
      exchange - The change
      annotationMetadata - The annotation metadata declared on the method
      value - The value to encode
      Returns:
      A publisher that emits completes with the response once the value has been encoded