Package org.projectforge.common

Examples of org.projectforge.common.MimeType


   * @param filename
   * @return
   */
  public static String getContentType(final String filename)
  {
    final MimeType mimeType = MimeType.getMimeType(filename);
    if (mimeType != null) {
      return mimeType.getMimeTypeString();
    }
    log.info("Unknown file type: " + filename);
    return "";
  }
View Full Code Here


    if (imageFormat != null) {
      final Document document = ganttChart.create();
      content = BatikImageRenderer.getByteArray(document, ganttChart.getWidth(), imageFormat);
      DownloadUtils.setDownloadTarget(content, filename);
    } else {
      final MimeType type;
      if (GanttChartEditForm.EXPORT_MS_PROJECT_MPX.equals(exportFormat) == true) {
        content = ExportMSProject.exportMpx(ganttChart);
        type = MimeType.MS_PROJECT;
      } else if (GanttChartEditForm.EXPORT_MS_PROJECT_XML.equals(exportFormat) == true) {
        content = ExportMSProject.exportXml(ganttChart);
View Full Code Here

TOP

Related Classes of org.projectforge.common.MimeType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.