Java 7以上じゃないと使用できない. ~~~java public byte[] convert(File file) throws IOException { return Files.readAllBytes(file.toPath()); } ~~~