MCPcopy
hub / github.com/google/guava / toString

Method toString

android/guava/src/com/google/common/io/Files.java:250–256  ·  view source on GitHub ↗

Reads all characters from a file into a {@link String}, using the given character set. @param file the file to read from @param charset the charset used to decode the input stream; see {@link StandardCharsets} for helpful predefined constants @return a string containing all the characters from

(File file, Charset charset)

Source from the content-addressed store, hash-verified

248 * @deprecated Prefer {@code asCharSource(file, charset).read()}.
249 */
250 @Deprecated
251 @InlineMe(
252 replacement = "Files.asCharSource(file, charset).read()",
253 imports = "com.google.common.io.Files")
254 public static String toString(File file, Charset charset) throws IOException {
255 return asCharSource(file, charset).read();
256 }
257
258 /**
259 * Overwrites a file with the contents of a byte array.

Callers 7

testToStringMethod · 0.95
testWriteStringMethod · 0.95
testAppendStringMethod · 0.95
testCopyFileMethod · 0.95
testCopyEqualFilesMethod · 0.95
testCopySameFileMethod · 0.95

Calls 2

asCharSourceMethod · 0.95
readMethod · 0.45

Tested by 7

testToStringMethod · 0.76
testWriteStringMethod · 0.76
testAppendStringMethod · 0.76
testCopyFileMethod · 0.76
testCopyEqualFilesMethod · 0.76
testCopySameFileMethod · 0.76