HOW detect EOF at below code? what put in place of
( i<3306 )
???
( i<3306 )
???
Code:
public mergerTxt()
{
try
{
File file = new File( "us-skype.lang" ); // get file name
File fileRu = new File( "ru-skype.lang" ); // get file name
File file2 = new File( "skype6bufferedAll.lang" );
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream (file), "UTF-8"));
BufferedReader readerRu = new BufferedReader(new InputStreamReader(new FileInputStream (fileRu), "UTF-8"));
BufferedWriter output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file2), "UTF-8"));
String result; // result from checking file
String result2; // result from checking file
String result3; // result from checking file
int dot ;
int dot2;
int i=1;
// file does exist
if ( file.exists() )
{
while ( i<3306 )
{
i++;
result = reader.readLine(); // read a line from file
result2 = readerRu.readLine(); // read a line from file
dot = result.lastIndexOf("=");
dot2 = result2.lastIndexOf("=");
result3 = result.substring(dot + 1) + " = " + result2.substring(dot2 + 1);
output.write( result3 + "\n" ); // output line of file
} // end while
} // end if
Comment