public void setRecentHashMapForUsers(HashMap<String, ServerThread> connectedClients) {
       
        clients = new ArrayList<String>();
       System.out.println("setRecentHashMapForUsers");
       //this.clients.clear();
       Iterator iter = connectedClients.entrySet().iterator();
 
        while (iter.hasNext()) {
                Map.Entry mEntry = (Map.Entry) iter.next();
                this.clients.add(mEntry.getKey().toString());
                System.out.println(mEntry.getKey());
        }
        String onlineClients = clients.toString();
        //get all offline users from userlist file
        ArrayList offlineClients = new ArrayList<String>();
        //offlineClients =ser.getOfflineUsers(recievedUsername);
        //offlineClients.toString();
        
       
            //out.writeUTF("%newList%:"+onlineClients+""+offlineClients);
            //out.flush();
            System.out.println("%newList%:"+onlineClients+""+offlineClients);
        
        
        
        
        //sendClients();
       /*
       
       String completeList = connectedClients.toString();
       completeList.replace("{", "");
       completeList.replace("}", "");
       this.finishedlist = "";
       String[] singleUser = completeList.split(",");
       for (int i=0; i <= singleUser.length;i++) {
           String user = singleUser.toString();
            this.finishedlist = this.finishedlist + user.substring(0, user.indexOf("="));
            
       }

       System.out.println("this is the finished list: "+this.finishedlist);
       //sendClients();
        
        
        */
    }