Java FileInputStream Read load(String file)

Here you can find the source of load(String file)

Description

load

License

Apache License

Declaration

public static String load(String file) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.FileInputStream;
import java.io.IOException;

public class Main {
    public static String load(String file) throws IOException {
        FileInputStream fin = new FileInputStream(file);
        byte[] b = new byte[fin.available()];
        fin.read(b);/* w  ww  . jav  a 2s  . c o m*/
        String str = new String(b);
        fin.close();
        return str;
    }
}

Related

  1. load(File file)
  2. load(File file)
  3. load(File file)
  4. loadContents(File file)
  5. loadData(File f)
  6. loadFolderFromJar(String path)
  7. loadRes(String res)