MCPcopy Index your code
hub / github.com/apache/commons-io / toString

Method toString

src/main/java/org/apache/commons/io/IOUtils.java:1019–1022  ·  view source on GitHub ↗

Gets the contents of an InputStream as a String using the default character encoding of the platform. This method buffers the input internally, so there is no need to use a BufferedInputStream . @param input the InputStream to read from @return the requeste

(final InputStream input)

Source from the content-addressed store, hash-verified

1017 * @deprecated 2.5 use {@link #toString(InputStream, Charset)} instead
1018 */
1019 @Deprecated
1020 public static String toString(final InputStream input) throws IOException {
1021 return toString(input, Charset.defaultCharset());
1022 }
1023
1024 /**
1025 * Gets the contents of an <code>InputStream</code> as a String

Callers 15

testToString_ReaderMethod · 0.95
testToString_URIMethod · 0.95
testToString_URLMethod · 0.95
testRawContentMethod · 0.95
testHttpContentMethod · 0.95
readFileToStringMethod · 0.95
IOUtilsClass · 0.45

Calls 4

copyMethod · 0.95
toStringMethod · 0.95
toCharsetMethod · 0.95
closeMethod · 0.45

Tested by 10

testToString_ReaderMethod · 0.76
testToString_URIMethod · 0.76
testToString_URLMethod · 0.76
testRawContentMethod · 0.76
testHttpContentMethod · 0.76