public void run() {

           AudioFormat format =new AudioFormat(8000,16,2,true,true);//AudioFormat(float sampleRate, int sampleSizeInBits, int channels, boolean signed, boolean bigEndian
           BufferedInputStream playbackInputStream;

           try {
             playbackInputStream=new BufferedInputStream(new AudioInputStream(s.getInputStream(),format,2147483647));
           }
           catch (IOException ex) {
               return;
           }

           DataLine.Info info = new DataLine.Info(SourceDataLine.class,format);

           try {
               line = (SourceDataLine) AudioSystem.getLine(info);
               line.open(format, bufSize);
           } catch (LineUnavailableException ex) {
               return;
           }

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

           while (thread != null) {
              try{
                 numBytesRead = playbackInputStream.read(data);
                 line.write(data, 0,numBytesRead);
              } catch (IOException e) {
                   break;
               }
           }

           if (thread != null) {
               line.drain();
           }

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