private static String loadPattern(String fileName) {
        BufferedReader in;
        StringBuilder b;
        
        if (fileName == null) {
            return null;
        } // if
        
        try {
            in = new BufferedReader(new InputStreamReader(new FileInputStream(fileName), Charset.forName(charsetName)));
        } catch (FileNotFoundException e) {
            return null;
        } // catch
        
        b = new StringBuilder();
        
        while(true) {
            String s;
            
            try {
                s = in.readLine();
            } catch (IOException e) {
                return null;
            } // catch
            
            if (s == null) {
                if (b.length() > 0) {
                    b.deleteCharAt(b.length() - 1);
                } // if
                break;
            } // if
            
            b.append(s);
            b.append('\r');
        } // while
        
        return b.toString();
    } // loadPattern