急救!!!j2me 服务器
这段代码怎么改就又可以群聊又可以私聊
这个是实现私聊的
public void sendMessage()
	{  
		
	  
		 String name=null;
		if(vectorOn.size()==0)
				   return;
		        for(int i=0;i<vectorOn.size();i++){
		        
		        try {
		        	OnlineClient oc=(OnlineClient)vectorOn.elementAt(i);
		        	if(oc.isQuit==true||oc.dis.available()==0)
		        	
		        	continue;
		        	style=(byte)oc.dis.read();
		        	 if(style==SYTLE_MESSAGE)
		        	{
		        		name=oc.dis.readUTF();
		        		String message=null;
						try {
							message = oc.dis.readUTF();
						} catch (
IOException e1) {
							System.out.println("chatthread erroer 5");
	                        e1.printStackTrace();
						
						}
						 for(int j=0;j<vectorOn.size();j++){
			    	        OnlineClient oct=(OnlineClient)vectorOn.elementAt(j);
			    	        if(oct.neckName.equals(name))
			    	        {
			    	        	if(oct.isQuit==false)
			    	        	{
			    	        		try {
				    	        		oct.dos.writeByte(SYTLE_MESSAGE);
										oct.dos.writeUTF(oc.neckName);
										System.out.println(oc.neckName);
										oct.dos.writeUTF(message);
									    } catch (IOException e1) {
									    	e1.printStackTrace();
									    	System.out.println("chatthread errror 6");
									
									}
			    	        	
			    	        	}
			    	        	
			    	        }
			    	        	
			        	}
			        }
		        	else if(style==SYTLE_QUIT)
		        	{   
		        		if(oc.Quit()==false)
		        		{   
		        			oc.isQuit=true;
		        			oc.dos.writeByte(QUIT_OK);
		        		}