Yes, you can do this in one line (though for robust IOException handling you wouldn't want to).
String content = new Scanner(new File("filename")).useDelimiter("\\Z").next();
This uses a java.util.Scanner, telling it to delimit the input with \Z, which is the end of the string anchor. This ultimately makes the input have one actual token, which is the entire file, so it can be read with one call to next().
There is a constructor that takes a File and a String charSetName (among many other overloads). These two constructor may throw FileNotFoundException, but like all Scanner methods, no IOException can be thrown beyond these constructors.
You can query the Scanner itself through the ioException() method if an IOException occurred or not. You may also want to explicitly close() the Scanner after you read the content, so perhaps storing the Scanner reference in a local variable is best.
For completeness, these are some really good options if you have these very reputable and highly useful third party libraries:
com.google.common.io.Files contains many useful methods. The pertinent ones here are:
String toString(File, Charset)
Using the given character set, reads all characters from a file into a String
List<String> readLines(File, Charset)
... reads all of the lines from a file into a List<String>, one entry per line
String toString(InputStream, String encoding)
Using the specified character encoding, gets the contents of an InputStream as a String
List readLines(InputStream, String encoding)
... as a (raw) List of String, one entry per line
Alright! Though may not be robust as you mentioned, no doubt this does it in minimum lines of code !
Please also see solution below for Java 7 mechanism that's essentially one line with the default API, as with many things Java has moved on slightly since this question.
Unfortunately, the Scanner solution fails with empty files (NoSuchElementException)
In addition to failing on empty files, it also omits the newline at the end of the file, if it exists.
return new Scanner(new URL(url).openStream(), "UTF-8").useDelimiter("\\A").next(); is better as it does not fail on empty files.
I have used this for some time, but it turns out it doesn't always work! Sometimes \\Z will actually occur in the file and will cause this to fail.