Package com. test;
Import java. io. BufferedReader;
Import java. io. BufferedWriter;
Import java. io. File;
Import java. io. FileNotFoundException;
Import java. io. FileReader;
Import java. io. FileWriter;
Import java. io. IOException;
Public class TextConvertor {
Public static String convertingStr (String lineStr ){
String retVal = "";
Return retVal;
}
Public static String readPath = "C: \ legal ents and Settings \ Administrator \ Desktop http://www.cnblogs.com/coconut_zhang/admin/file://1.txt ";
Public static String writePath = "C: \ legal ents and Settings \ Administrator \ Desktop http://www.cnblogs.com/coconut_zhang/admin/file://1-bak.txt ";
/**
* @ Param args
* @ Throws IOException
*/
Public static void main (String [] args) throws IOException {
File file = new File (readPath );
If (! File. exists ()){
System. out. println ("File not exist! ");
System. exit (0 );
}
BufferedReader br = new BufferedReader (new FileReader (readPath ));
BufferedWriter bw = new BufferedWriter (new FileWriter (writePath ));
String temp = "";
While (temp = br. readLine ())! = Null ){
System. out. println (temp );
Int I = 0;
For (I = 0; I <temp. length (); I ++ ){
String subTemp = temp. substring (I, I + 1 );
If (subTemp. matches ("[^ \ x00-\ xff]") {
System. out. println (subTemp + ": true ");
Break;
} Else
System. out. println (subTemp + ": false ");
}
If (I = temp. length ())
Temp = temp. substring (0, I-1) + "\ t" + temp. substring (I );
Else
Temp + = "\ t ";
Bw. write (temp );
Bw. newLine ();
}
Bw. flush ();
Br. close ();
Bw. close ();
}
}