Writing ISO Latin-1 Encoded Data in Java
IntroductonIn this program, you will see how to write content in a file in the ISO Latin-1 character set. This program takes a file name, if the given file exists then writes text into the file otherwise shows the message : "File does not exists.".
out.write( )
This is the method is used to write text in the
specified file in the ISO Latin-1 character set. Here, the specified string is
"Welcome to RoseIndia.Net"
which has to be written into the file.
Here is the code of the program :
import java.io.*;
|
Output of the Program:
C:\nisha>javac WriteEncodedLatin.java C:\nisha>java WriteEncodedLatin Enter File name : Filterfile.txt Written Process Completed C:\nisha> |