abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r656942 - /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java
Date Fri, 16 May 2008 05:54:58 GMT
Author: jmsnell
Date: Thu May 15 22:54:58 2008
New Revision: 656942

URL: http://svn.apache.org/viewvc?rev=656942&view=rev
Log:
Fix a test broken by the fix for https://issues.apache.org/jira/browse/ABDERA-159

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java?rev=656942&r1=656941&r2=656942&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java
Thu May 15 22:54:58 2008
@@ -41,6 +41,15 @@
    
   private static final MimeType WILDCARD = createWildcard();
   
+  public static String getCharset(String mediatype) {
+    try {
+      MimeType mt = new MimeType(mediatype);
+      return mt.getParameter("charset");
+    } catch (Exception e) {
+      return null;
+    }
+  }
+  
   private static MimeType createWildcard() {
     try {
       return new MimeType("*/*");



Mime
View raw message