package Com.Client.view;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class QqClientLogin {
public static void main(String[] args) throws IOException {
String line = "";
String temp ="";
String temp2="";
String temp3="";
FileReader f = new FileReader("e:\\work\\aa.txt");
FileOutputStream fos = new FileOutputStream("e:\\work\\bb.txt");
BufferedReader br = new BufferedReader(f);
while((line = br.readLine()) != null){
temp = line;
int c1Pos = temp.indexOf(" ");
int c2Pos = temp.indexOf("#");
int c3Pos = temp.indexOf("/");
if(c2Pos>c1Pos)//#之前就有空格了
{
temp2 = temp.substring(c2Pos+8,c3Pos);
}
else
{
temp2 = temp.substring(c1Pos+1,c3Pos);//#define data
}
//temp3 = temp.substring(0, c3Pos);
int size = temp2.length();
byte bytes[] = new byte[size+2];
char [] chArr = temp2.toCharArray();
for(int icr=0; icr<chArr.length;icr++)
{
bytes[icr]=(byte) chArr[icr];
}
bytes[size]='\r';
bytes[size + 1]='\n';
fos.write(bytes);
}
}
}