windows字符串中的换行符="\r\n"replaceAll(yourString,"\r\n","");public static String replaceAll(String str, String old, String news)
{
if(str == null)
return str;
int begin = 0;
int idx = 0;
int len = old.length();
StringBuffer buf = new StringBuffer();
while((idx = str.indexOf(old, begin)) >= 0) 
{
buf.append(str.substring(begin, idx));
buf.append(news);
begin = idx + len;
}

return new String(buf.append(str.substring(begin)));
}