I am trying to use IOUtils.toString() to read from a file. However, I am getting an error saying "IOUtils cannot be resolved."
What am I supposed to be importing to allow me to use this function?
String everything = IOUtils.toString(inputStream);
Thanks
import org.apache.commons.io.IOUtils;
If you still can't import add to pom.xml:
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
or for direct jar/gradle etc visit: http://mvnrepository.com/artifact/commons-io/commons-io/2.5
Also since version 2.5 of commons-io method IOUtils.toString(inputStream) has been deprecated. You should use method with Encoding i.e.
IOUtils.toString(is, "UTF-8");