1 48 49 package org.jpublish.util.mime; 50 51 import java.util.ArrayList ; 52 import java.util.List ; 53 import java.util.StringTokenizer ; 54 55 60 61 public class MimeType { 62 63 66 public static final String DELIMITER = ","; 67 68 private List suffixes; 69 70 73 74 public MimeType() { 75 suffixes = new ArrayList (); 76 } 77 78 84 85 public MimeType(String suffixString) { 86 suffixes = new ArrayList (); 87 addSuffixes(suffixString); 88 } 89 90 96 97 public List getSuffixes() { 98 return suffixes; 99 } 100 101 107 108 public void addSuffixes(String suffixString) { 109 StringTokenizer tk = new StringTokenizer (suffixString, DELIMITER); 110 while (tk.hasMoreTokens()) { 111 suffixes.add(tk.nextToken().trim()); 112 } 113 } 114 115 } 116 | Popular Tags |