I am writing a file which is very important for the application (Client & vendor specific). I would like to know what are the point should i consider at writting the file. Please see below a demo file writing process
public class EDIWriter {
public final static String END_OF_ATTRIBUTE = "|";
File file;
BufferedWriter writer;
public void writer(){
try{
file = new File("C://edifile.edi");
writer = new BufferedWriter(new FileWriter(file));
StringBuilder editext = new StringBuilder();
editext.append("ISA");
editext.append(END_OF_ATTRIBUTE);
editext.append("00");
editext.append(END_OF_ATTRIBUTE);
writer.write(editext.toString());
writer.flush();
writer.close();
}catch(IOException e){
e.printStackTrace();
}catch(Exception e){
e.printStackTrace();
}
}
public static void main(String arg[]){
new EDIWriter().writer();
}
}