> I have a file error.txt,I want to append message into the file tail.I
may get error.txt as OutputStream,like that:
OutputStream is = this.getClass().getResourceAsStream("error.txt");
I have a struct,it concludes:
1) Exception e
2) String errMsg
3) Date
I want to write e.printStackTrace(),errMsg and new Date() into this file
by adopting append method.How to realize it?
Any idea will be appreciated!
Thanks in advance!!!
Edward
create such a method
public void ( QutputStream is , Msg msg)
{
is.write( msg.exception.toString());
is.write( msg . errMsg );
is.write( new Date()) ; // not sure , it may changge to string first
}