spring-framework / org.springframework.util / FileCopyUtils / copyToString

copyToString

open static fun copyToString(@Nullable in: Reader): String

Copy the contents of the given Reader into a String. Closes the reader when done.

Parameters

in - the reader to copy from (may be null or empty)

Exceptions

IOException - in case of I/O errors

Return
the String that has been copied to (possibly empty)