Commit f52dac20 authored by 张永's avatar 张永

1

parent 0b1adbf0
......@@ -989,4 +989,29 @@ public class StringUtil {
return numbers.toArray(new String[numbers.size()]);
}
/**
*
* @Description 从BufferedReader对象中读取字符串或文本
* @param reader
* @return
* @author 曲欣亮
* @date 2016年4月25日
* @since 2016年4月25日
* @return String
* @throws
*/
public static String read(BufferedReader reader) {
try {
StringBuffer sb = new StringBuffer();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + System.getProperty("line.separator"));
}
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
}
return "";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment