This is familiar, I think I answered a very similar recently too.
Here we go:
http://www.codingforums.com/showthread.php?p=1145340
I can't be sure, but methinks Java 7 may not have been in a stable API at this point. I make specific note of a missing method within that CLASS, BUT! The Attributes class does not appear to exist within the java.nio.attributes package anymore. On top of this, Files no longer appears to have a method called .readBasicFileAttributes.
According to oracle, this was stable as of July 28, 2001. So I'm not sure whether the API is not correct, or if the methods are not correct. I don't develop in Java 7 at all, so I'm not sure which is best to trust.
I did find this in the API for BasicFileAttributes:
BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class);, which is similar to my previous post. So it looks to me like they dumped the readBasicFileAttributes and are now only supporting the readAttributes. I'm guessing they were slow updating their API from the last thread I replied to since Java 7 was stable at the time.
Check your book to see its published date. If it pre-dates July 28, 2011, then you will have intermittent available methods since the API was unstable at that point.