下面是发送消息类:public class SendData
{
  Socket  socket=null;
  protected  BufferedReader  inStream=null;
  protected  PrintWriter outStream=null;  public SendData()
  {
    try
    {
      init();
      sendMsg();
    }
    catch(Exception e )
    {
      System.out.println(e.toString());
    }
  }  void init() throws Exception
  {
    socket=new Socket("192.168.0.14",4385);
    inStream  =  new  BufferedReader(new  InputStreamReader(this.socket.getInputStream()));
    outStream  =  new  PrintWriter(this.socket.getOutputStream(),  true);
  }  void  sendMsg()
  {      String str=="0020213808685517xxxxxxxx*pang#renfenru*";
      try
      {        System.out.println("Client accepting msg:");
        outStream.println(str);
        outStream.flush();
        
      }
      catch(IOException  e1)
      {
        System.out.println(e1.toString());
        System.exit(-1);
      }
    
  }  public  static  void main(String [] args)
  {
    int  str=0;
    SendData sendData=new SendData();
   }}下面是接收消息线程:public  class  ReceiveMsg  extends  Thread   //的消息,并存入buffer1
{
  protected  BufferedReader  inStream;
  protected  PrintWriter outStream;
  protected  Socket  socket;  public  ReceiveMsg(Socket  socket)  //构造函数
  {
    try
    {
      this.socket=socket;
      inStream  =  new  BufferedReader(new  InputStreamReader(this.socket.getInputStream()));
      outStream  =  new  PrintWriter(this.socket.getOutputStream(),  true);
    }
    catch(Exception e)
    {
      System.out.println(e.toString());
    }
  }  public  void  run()  //重载run方法
  {
    String msg=null;
    try
    {
      while(true)
      {
        try
        {
          msg=inStream.readLine();  //读取消息
          System.out.println("Accept msg:...");
        }
        catch(IOException  e)
        {
          System.out.println(e.toString());
          
        }
        System.out.println("RFSMC: "+msg);
        InputMsgBuffer1(msg);    //讲消息存入buffer1
      }
    }
    catch(Exception e)
    {
      System.out.println(e.toString());
    }
    
  }  public  void  InputMsgBuffer1(String  msg) throws Exception
  //将数据放入buffer1;
  {
    synchronized(ServerThread.buffer1)
    {
      ServerThread.buffer1.addElement(msg);
    }
  }}当该接收消息线程启动后,发送一条消息,接收到的地一条消息为正确消息;
但是此后,接收线程仍然不停地接收消息,而显示结果接到消息为null.
请各位大侠帮帮忙。