From 687d119265e13ce6b523a5db83bf5d9c4579831f Mon Sep 17 00:00:00 2001 From: tkellner Date: Thu, 19 Dec 2013 14:31:48 +0000 Subject: Expand MimeTypes, use for CMSHashDataInput git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1268 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../java/at/gv/egiz/bku/gui/viewer/MimeTypes.java | 52 ++++++++++++++-------- 1 file changed, 34 insertions(+), 18 deletions(-) (limited to 'BKUCommonGUI/src/main/java/at/gv') diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java index 17316602..6984c47a 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java @@ -36,27 +36,43 @@ public class MimeTypes { private static final Map FILE_EXTENSIONS = new HashMap() { private static final long serialVersionUID = 1L; -{ - put("application/msword", ".doc"); - put("application/octet-stream", ".bin"); - put("application/pdf", ".pdf"); - put("application/xhtml+xml", ".xhtml"); - put("text/html", ".html"); - put("text/plain", ".txt"); - put("text/xml", ".xml"); - }}; + { + put("application/gzip", ".gz"); + put("application/msword", ".doc"); + put("application/octet-stream", ".bin"); + put("application/pdf", ".pdf"); + put("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx"); + put("application/xhtml+xml", ".xhtml"); + put("application/xml", ".xml"); + put("application/zip", ".zip"); + put("image/gif", ".gif"); + put("image/jpeg", ".jpg"); + put("image/png", ".png"); + put("text/html", ".html"); + put("text/plain", ".txt"); + put("text/xml", ".xml"); + } + }; private static final Map DESCRIPTIONS = new HashMap() { private static final long serialVersionUID = 1L; -{ - put("application/msword", "mimetype.desc.doc"); - put("application/octet-stream", "mimetype.desc.bin"); - put("application/pdf", "mimetype.desc.pdf"); - put("application/xhtml+xml", "mimetype.desc.xhtml"); - put("text/html", "mimetype.desc.html"); - put("text/plain", "mimetype.desc.txt"); - put("text/xml", "mimetype.desc.xml"); - }}; + { + put("application/gzip", "mimetype.desc.gz"); + put("application/msword", "mimetype.desc.doc"); + put("application/octet-stream", "mimetype.desc.bin"); + put("application/pdf", "mimetype.desc.pdf"); + put("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "mimetype.desc.docx"); + put("application/xhtml+xml", "mimetype.desc.xhtml"); + put("application/xml", "mimetype.desc.xml"); + put("application/zip", "mimetype.desc.zip"); + put("image/gif", "mimetype.desc.gif"); + put("image/jpeg", "mimetype.desc.jpg"); + put("image/png", "mimetype.desc.png"); + put("text/html", "mimetype.desc.html"); + put("text/plain", "mimetype.desc.txt"); + put("text/xml", "mimetype.desc.xml"); + } + }; public static String getExtension(String mimetype) { if (FILE_EXTENSIONS.containsKey(mimetype)) { -- cgit v1.2.3