yf0994 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Improve Files.toString(File, Charset) #1154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Guava requires Java 1.6 so String(byte[], Charset) constructor can be used now:

public static String toString(File file, Charset charset) throws IOException {
-  return new String(toByteArray(file), charset.name());
+  return new String(toByteArray(file), charset);
}

Original issue reported on code.google.com by Ash2kk@gmail.com on 26 Sep 2012 at 11:39

GoogleCodeExporter commented 9 years ago

Original comment by lowas...@google.com on 28 Sep 2012 at 4:16

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 29 Sep 2012 at 12:42

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08