[java]代码库/**
* @param lineNumber 选择要添加内容的行数
* @param attribute1 选择要添加的内容1
* @param attribute2 选择要添加的内容1
* 给finalFile,tempFilePath改成你自己的路径就可以用了
*/
public static void appendText(int lineNumber, String attribute1, String attribute2) throws IOException {
int count = 0;
String tempFilePath=NewPath.sampleFolderPath+"\\temp.java";
File finalFile = new File(NewPath.sample_Main);
File tempFile=new File(tempFilePath);
Utils.CopyFile(NewPath.sample_Main, tempFilePath);
FileInputStream fileInputStream;
try {
fileInputStream = new FileInputStream(tempFile);
//读取文件类
InputStreamReader inReader = new InputStreamReader(fileInputStream, "UTF-8");
BufferedReader bufReader = new BufferedReader(inReader);
String line = null;