Android File Read readInstallationFile(File installation)

Here you can find the source of readInstallationFile(File installation)

Description

read Installation File

License

Open Source License

Declaration

private static String readInstallationFile(File installation)
            throws IOException 

Method Source Code

//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);
    }
}

Related

  1. readFileAsString(String filePath)
  2. readFileToByte(File file)
  3. readFileToString(String fileName)
  4. readFileToString(String pathToFile)
  5. readFromFile(String filename)
  6. readStringFromFile(File file)
  7. readTemplate(String filePath)
  8. readTextFile(File file)
  9. loadFile(String str)