void ReceiveFile(String filename) throws Exception
 {
	 System.out.println("server receive file :" +filename);
     if(filename.compareTo("File not found")==0)     {
         return;
     }
     File f=new File(filename);
     String option;
     
     if(f.exists())     {
         dout.writeUTF("File Already Exists");
         option=din.readUTF();
         System.out.println("option "+option);
     }
     else     {
         dout.writeUTF("SendFile");
         option="Y";
         
     }
         
         if(option.compareTo("Y")==0)
         {
             FileOutputStream fout=new FileOutputStream(f);
             int ch;
             String temp;
             do
             {
                 temp=din.readUTF();
                 System.out.println("temp>>"+temp);
                 if(temp.equals("File not found"))
                	 return;
                 ch=Integer.parseInt(temp);
                 if(ch!=-1)
                 {
                     fout.write(ch);                    
                 }
             }while(ch!=-1);
             fout.close();
             dout.writeUTF("File Send Successfully");
         }
         else
         {
             return;
         }
         
 }