Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

OutputStream with command environment PROBLEM  RSS feed

 
Tommy Lee
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write the follow code one is pass but the other one throw exception
CODE
------------------
try{
File file = new File(file_name);
FileOutputStream fos = new FileOutputStream(file,true);
fos.write(content.getBytes());
fos.close();
}catch(FileNotFoundException e){
throw new RuntimeException(e.toString());
}catch(IOException e){
throw new RuntimeException(e.toString());
}
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, what's your question?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!