public class ReadFile {
public static void main(String args[]){
String pathRequest = "SupportFiles\\Test\\"+apiName+".txt";
readFile(pathRequest);
}
private static void readFile(String pathRequest) {
FileInputStream fis = null;
DataInputStream in = null;
InputStreamReader isr = null;
BufferedReader br = null;
try {
fis = new FileInputStream(pathRequest);
in = new DataInputStream(fis);
isr = new InputStreamReader(in);
br = new BufferedReader(isr);
String strLine;
while ((strLine = br.readLine()) != null){
System.out.println (strLine);
}
} catch (Exception e) {
e.printStackTrace();
}finally{
try {
br.close();
isr.close();
in.close();
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Subscribe to:
Post Comments (Atom)
SpringBoot Application Event Listeners
When a spring boot application starts few events occurs in below order ApplicationStartingEvent ApplicationEnvironmentPreparedEvent Applicat...
-
1. Create a tld file inside WEB-INF folder having declaration of the custom function as below <?xml version="1.0" encoding=...
-
Issue : When trying to execute "maven clean install", I am getting an error message saying "PKIX path building failed. unable...
No comments:
Post a Comment