import java.io.*;
public class Readfile {
public void readfile() throws IOException{
File f=new File("/var/www/html/study/test.txt");
if(f.isFile() && f.exists()){
InputStream file = new FileInputStream(f);
InputStreamReader read = new InputStreamReader(file,"GBK");
BufferedReader bufferedReader = new BufferedReader(read);
String line = null;
while((line=bufferedReader.readLine()) != null){
System.out.print(line);
}
}else{
System.out.print("this file is not exit");
}
}
}