ninja.utils
Class SwissKnife

java.lang.Object
  extended by ninja.utils.SwissKnife

public class SwissKnife
extends Object

A helper class that contains a lot of random stuff that helps to get things done.

Author:
ra

Constructor Summary
SwissKnife()
           
 
Method Summary
static org.apache.commons.configuration.Configuration loadConfigurationFromClasspathInUtf8(String classLoaderUrl, Class clazz)
          This is important: We load stuff as UTF-8.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwissKnife

public SwissKnife()
Method Detail

loadConfigurationFromClasspathInUtf8

public static org.apache.commons.configuration.Configuration loadConfigurationFromClasspathInUtf8(String classLoaderUrl,
                                                                                                  Class clazz)
This is important: We load stuff as UTF-8. Returns the file or null if not found.

Parameters:
classLoaderUrl - Classpath location of the configuration file. Eg /conf/heroku.conf
clazz - We need a classloader and clazz provides the classloader.
Returns:
A configuration or null if there were problems getting it.


Copyright © 2012. All Rights Reserved.