Interface MediaTypeResolver


  • public interface MediaTypeResolver
    The MediaTypeResolver interface.

    For using customized class for content-type

    ZK default will be used, if not implemented. Specify the library property of org.zkoss.util.media.MediaTypeResolverImpl.class in zk.xml to provide a customized class for content-type. (since 7.0.1)

    Should first specify the library property of org.zkoss.web.util.resource.dir in zk.xml, the files in this path will get content-type by the customized class.

    For example, if the value of org.zkoss.web.util.resource.dir in zk.xml is "/WEB-INF/cwr", and src in your zul should be set as "~./yourfile.jpg".

    it will load "yourfile.jpg" from "/WEB-INF/cwr", and will use your customized class for content-type.

    Since:
    8.0.1
    Author:
    wenning
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String resolve​(java.lang.String format)
      Returns the content-type of the specified format for the specified filename extension, or null if not found.
    • Method Detail

      • resolve

        java.lang.String resolve​(java.lang.String format)
        Returns the content-type of the specified format for the specified filename extension, or null if not found.