Skip to main content

Read file as string in Java using Apache commons-io library

 Add commons-io library to your build tool. For maven, as below



Use following code to read file as string.


Below is a simple test case for above example.

Comments