I have one question for read files of a directory. First,
String[] files = sourceDirectory.list();
I collect some data traces and put them in a directory. I wish to read the files in the order of created time because I want to keep the sequence of data traces.
In the File.list()
documentation, it can not guarantee a consistency order. How can I read files in an order?
The second question is: I want to compute the interval time between 2 messages from message name because message names have time stamp information. For example,
trace2011_Aug_3__0_0_1
and trace2011_Aug_3__0_0_5
. How can I convert the string values into Date object and compute the difference between them?
Thank you very much.