OSDN Git Service

efff526b764ee23a4c58b51ff704a9b39ea0c20f
[coroid/inqubus.git] / frontend / src / yukihane / Util.java
1 /* $Id$ */
2 package yukihane;
3
4 /**
5  * nicobrowser.util.Util\82æ\82è, \95K\97v\82È\82à\82Ì\82ð\83s\83b\83N\83A\83b\83v\82µ\82½\83N\83\89\83X.
6  * @author yuki
7  */
8 public class Util {
9
10     /**
11      * Content-Type \82©\82ç\8ag\92£\8eq\82ð\8c\88\92è\82·\82é.
12      * @param contentType Content-Type\95\8e\9a\97ñ.
13      * @return \90\84\91ª\82³\82ê\82é\8ag\92£\8eq.
14      */
15     public static String getExtention(String contentType) {
16         if ("video/flv".equals(contentType) || "video/x-flv".equals(contentType)) {
17             return "flv";
18         } else if ("video/mp4".equals(contentType)) {
19             return "mp4";
20         } else if ("application/x-shockwave-flash".equals(contentType)) {
21             return "swf";
22         }
23         return contentType.split("/")[1];
24     }
25 }