public void run() {

           try {
             captrueOutputStream=new BufferedOutputStream(s.getOutputStream());
           }
           catch (IOException ex) {
               return;
           }

           AudioFormat format =new AudioFormat(8000,16,2,true,true);//AudioFormat(float sampleRate, int sampleSizeInBits, int channels, boolean signed, boolean bigEndian
           DataLine.Info info = new DataLine.Info(TargetDataLine.class,format);

           try {
               line = (TargetDataLine) AudioSystem.getLine(info);
               line.open(format, line.getBufferSize());
           } catch (Exception ex) {
               return;
           }

           byte[] data = new byte[1024];
           int numBytesRead=0;
           line.start();

           while (thread != null) {
               numBytesRead = line.read(data, 0,128);
               try {
                 captrueOutputStream.write(data, 0, numBytesRead);
               }
               catch (Exception ex) {
                   break;
               }
           }

           line.stop();
           line.close();
           line = null;

           try {
               captrueOutputStream.close();
           } catch (IOException ex) {
               ex.printStackTrace();
           }
       }