Here you can find the source of readInstallationFile(File installation)
private static String readInstallationFile(File installation) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; public class Main { private static String readInstallationFile(File installation) throws IOException { RandomAccessFile f = new RandomAccessFile(installation, "r"); byte[] bytes = new byte[(int) f.length()]; f.readFully(bytes);// w w w . j ava 2s . c o m f.close(); return new String(bytes); } }