svn commit: r564168 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r564168 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java

jstrachan-2
Author: jstrachan
Date: Thu Aug  9 04:04:39 2007
New Revision: 564168

URL: http://svn.apache.org/viewvc?view=rev&rev=564168
Log:
added some helper methods to create XQuery expressions from a file / URL

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?view=diff&rev=564168&r1=564167&r2=564168
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java Thu Aug  9 04:04:39 2007
@@ -16,19 +16,20 @@
  */
 package org.apache.camel.util;
 
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.converter.ObjectConverter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import java.lang.annotation.Annotation;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.converter.ObjectConverter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 /**
  * A number of useful helper methods for working with Objects
  *
@@ -336,7 +337,7 @@
 
     /**
      * Converts primitive types such as int to its wrapper type like
-     * {@link Integeer}
+     * {@link Integer}
      */
     public static Class convertPrimitiveTypeToWrapperType(Class type) {
         Class rc = type;
@@ -358,4 +359,10 @@
         return rc;
     }
 
+    /**
+     * Helper method to return the default character set name
+     */
+    public static String getDefaultCharacterSet() {
+        return Charset.defaultCharset().name();
+    }
 }