Java tutorial
//package com.java2s; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; public class Main { private static String readInstallationFile(File installation) throws IOException { RandomAccessFile accessFile = new RandomAccessFile(installation, "r"); byte[] bs = new byte[(int) accessFile.length()]; accessFile.readFully(bs); accessFile.close(); return new String(bs); } }