Saturday, 1 June 2013

Copy Paste File to File Java


import java.io.*; 
class FileToFile
{
 public static void main(String args[])throws Exception
  {
   char x;
   FileInputStream ip=null;
   FileOutputStream op=null;

   ip=new FileInputStream("input.txt");
   op=new FileOutputStream("output.txt");
   x=(char)ip.read();
   while(x!='.')
   {
     op.write(x);
     x=(char)ip.read();
   }
   ip.close();
   op.close();
  } 
}

Download With OUTPUT


EmoticonEmoticon

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:o
:>)
(o)
:p
:-?
(p)
:-s
8-)
:-t
:-b
b-(
(y)
x-)
(h)