Example usage for javax.imageio.spi ImageReaderSpi getMIMETypes

List of usage examples for javax.imageio.spi ImageReaderSpi getMIMETypes

Introduction

In this page you can find the example usage for javax.imageio.spi ImageReaderSpi getMIMETypes.

Prototype

public String[] getMIMETypes() 

Source Link

Document

Returns an array of String s containing a list of MIME types associated with the formats that are generally usable by the ImageReader or ImageWriter implementation associated with this service provider.

Usage

From source file:it.tidalwave.imageio.test.ImageReaderTestSupport.java

/*******************************************************************************************************************
 *
 *
 ******************************************************************************************************************/
protected void assertMIMETypes(final String extension, final String... mimeTypes) {
    final Iterator<ImageReader> i = ImageIO.getImageReadersBySuffix(extension);
    assertTrue(i.hasNext());/*from ww  w .  j  a  v  a  2s  .co  m*/
    final ImageReader ir = i.next();
    assertNotNull(ir);
    assertFalse(i.hasNext());
    final ImageReaderSpi provider = ir.getOriginatingProvider();
    assertEquals(mimeTypes, provider.getMIMETypes());
}