Example usage for org.springframework.util MimeType MimeType

List of usage examples for org.springframework.util MimeType MimeType

Introduction

In this page you can find the example usage for org.springframework.util MimeType MimeType.

Prototype

public MimeType(String type) 

Source Link

Document

Create a new MimeType for the given primary type.

Usage

From source file:org.springframework.cloud.stream.app.log.sink.LogSinkApplicationTests.java

@Test
public void testJsonContentType() {
    Message<byte[]> message = MessageBuilder.withPayload("{\"foo\":\"bar\"}".getBytes())
            .setHeader("contentType", new MimeType("json")).build();
    this.testMessage(message, "{\"foo\":\"bar\"}");
}