filewriter - How do I get Java to write the contents of an ArrayList to a file once every minute? -


just quick question above subject. basically, i'm writing piece of software captures data network , writes external file further processing.

what want know code best use in order desired effect.

thanks time

david

i'd implement using timertask. e.g.,

int hour = 1000*60*60; int delay = 0; timer t = new timer();  t.scheduleatfixedrate(new timertask() {     public void run() {         // write disk ...     } }, delay, hour); 

otherwise quarts powerful java scheduler capable of handling more advanced scheduling needs.


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -