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

Method toString

guava/src/com/google/common/io/CharStreams.java:162–164  ·  view source on GitHub ↗

Reads all characters from a {@link Readable} object into a {@link String}. Does not close the {@code Readable}. <p><b>Java 25+ users:</b> If the input is a {@link Reader}, prefer {@link Reader#readAllAsString()}. @param r the object to read from @return a string containing all the characters @thro

(Readable r)

Source from the content-addressed store, hash-verified

160 * @throws IOException if an I/O error occurs
161 */
162 public static String toString(Readable r) throws IOException {
163 return toStringBuilder(r).toString();
164 }
165
166 /**
167 * Reads all characters from a {@link Readable} object into a new {@link StringBuilder} instance.

Callers 4

readMethod · 0.95
testOnlyOneOpenMethod · 0.95
testSimpleMethod · 0.95
testToStringMethod · 0.95

Calls 2

toStringBuilderMethod · 0.95
toStringMethod · 0.65

Tested by 3

testOnlyOneOpenMethod · 0.76
testSimpleMethod · 0.76
testToStringMethod · 0.76