public static Map queryToMap()

in bigtop-bigpetstore/bigpetstore-transaction-queue/src/main/java/org/apache/bigtop/bigpetstore/qstream/SimpleHttpServer.java [107:126]


    public static Map<String, String> queryToMap(String q){
        //after the slash.
        String query=q.substring(2);
        Map<String, String> result = new HashMap<String, String>();
        if(query==null){
            System.out.println("QUERY IS NULL") ;
            return result;
        }
        System.out.println(query);
        for (String param : query.split("&")) {
            System.out.println("reading param on server : " + param + " " + query);
            String pair[] = param.split("=");
            if (pair.length>1) {
                result.put(pair[0], pair[1]);
            }else{
                result.put(pair[0], "");
            }
        }
        return result;
    }