while ((str = bufferedReader.readLine()) != null) {
string = stringBuffer.append(str);
if ((start = string.indexOf("<标题>")) != -1) {
end = string.indexOf("</标题>");
keyBoard.setName(string.substring(start+4, end));
System.out.println(string.substring(start+4, end));
FileOutputStream fileOutputStream = new FileOutputStream(
"D:/work/" + keyBoard.getName() +"."+ keyBoard.getSuffix2(), true);
OutputStreamWriter writer = new OutputStreamWriter(fileOutputStream, "utf-8");
while (((q=string.length()-37) > e1)) {
i++;
s1 = string.indexOf("<文段>");
e1 = string.indexOf("</文段>");
if(s1==-1){
s1=e1-21;
} System.out.println(string.substring(s1, e1+5)+"//////////**--*-*/*"+i);
string.replace(0, e1+5, "");
}
System.out.println("加载完毕");
}

}
这个是控制台的内容这个是文本没有自动换行的时候内容这个是自动换行后看到的内容,可以确定,内容的结尾和下一行不在一行中