@@ -0,0 +1,1029 @@
+package com.robothand.highqualitybot;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.util.Hashtable;%0Aimport java.util.Scanner;%0A%0A/**%0A * Static class that stores various utility methods and sundries.%0A */%0Apublic class Utils %7B%0A%0A    // Loads the properties from a given .cfg file into a Hashtable%0A    public static Hashtable%3CString,String%3E readCFG(String filename) throws FileNotFoundException %7B%0A        Hashtable%3CString,String%3E properties = new Hashtable%3C%3E();%0A        File file = new File(filename);%0A%0A        Scanner s = new Scanner(file);%0A%0A        while (s.hasNextLine()) %7B%0A            String%5B%5D split = s.nextLine().split(%22=%22);%0A            String key, value;%0A%0A            if (split.length %3C 2 %7C%7C split%5B0%5D.trim().startsWith(%22#%22)) %7B%0A                continue;%0A            %7D%0A%0A            key = split%5B0%5D.trim();%0A            value = split%5B1%5D.trim();%0A%0A            if (properties.replace(key, value) == null) %7B%0A                properties.put(key, value);%0A            %7D%0A        %7D%0A%0A        return properties;%0A    %7D%0A%7D%0A

create Utils class with readCFG() method