Example usage for org.springframework.core.codec Encoder getEncodableMimeTypes

List of usage examples for org.springframework.core.codec Encoder getEncodableMimeTypes

Introduction

In this page you can find the example usage for org.springframework.core.codec Encoder getEncodableMimeTypes.

Prototype

List<MimeType> getEncodableMimeTypes();

Source Link

Document

Return the list of mime types this encoder supports.

Usage

From source file:org.springframework.http.codec.EncoderHttpMessageWriter.java

/**
 * Create an instance wrapping the given {@link Encoder}.
 *///  w ww . j a v  a2  s  . c o  m
public EncoderHttpMessageWriter(Encoder<T> encoder) {
    Assert.notNull(encoder, "Encoder is required");
    this.encoder = encoder;
    this.mediaTypes = MediaType.asMediaTypes(encoder.getEncodableMimeTypes());
    this.defaultMediaType = initDefaultMediaType(this.mediaTypes);
    initLogger(encoder);
}