If you are using JDK 7 you can use the following code..
import java.nio.file.Files; import java.io.File; File fi = new File("myfile.jpg"); byte[] fileContent = Files.readAllBytes(fi.toPath())
1.4m articles
1.4m replys
5 comments
56.9k users