by Dinesh Thakur

 

import java.io.*;

class CopyingContentsRemovingVowels
{
              public static void main(String args[]) throws IOException
                {
                      int p;
                      FileOutputStream hh;
                      FileInputStream fp;
                      try
                        {
                            fp=new FileInputStream(args[0]);
                        }
                            catch(FileNotFoundException e)
                                  {
                                      System.out.println("File can not be found");
                                      return;
                                   }
                                       try
                                        {
                                            hh=new FileOutputStream(args[1]);
                                        }
                                             catch(IOException e)
                                                    {
                                                         System.out.println("File can not be created");
                                                         return;
                                                    }
                                                         do
                                                           {
                                                              p=fp.read();
                                                              if(p !=-1);
                                                                   {
                                                                     if(p=='a' || p=='e' || p=='i' || p=='o' || p=='u' ||
                                                                      p=='A' || p=='E' || p=='I' || p=='O' || p=='U')    
                                                                     continue;
                                                                     hh.write(p);
                                                                     System.out.print((char)p);
                                                                   }
                                                           }while(p !=-1);
                                                                     fp.close();
                                                                     hh.close();
                  }
 }

Copying Contents After Removing Vowels