Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1eeda60

Browse files
Update how-do-i-create-a-java-string-from-the-contents-of-a-file.md
1 parent b11f01e commit 1eeda60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎contents/how-do-i-create-a-java-string-from-the-contents-of-a-file.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ String content = readFile("test.txt", Charset.defaultCharset());
4848

4949
注: 这个答案与之前Java6版本时的答案完全不同。Java 7 新增的工具类极大的优化了字符处理,文件读取等功能。Java 6 常用的内存映射方法已不适合在Java 7 以后的版本使用。
5050

51-
51+
### 原文链接
52+
http://stackoverflow.com/questions/326390/how-do-i-create-a-java-string-from-the-contents-of-a-file
53+
5254

5355

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /