File dir = new File(doc.getParent());
// File dir = doc;
System.out.println(dir.getPath());
String[] files = dir.list(new SuffixFileFilter(".binary"));
for (int i = 0; i < files.length; i++) {
AmfTrace trace = new AmfTrace();
System.out.println("===================================================");
System.out.println(files[i]);
System.out.println(dir.getPath()+File.separatorChar+files[i]);
byte[] theFile = FileUtils.readFileToByteArray(new File(dir.getPath()+File.separatorChar+files[i]));
ByteArrayInputStream bais = new ByteArrayInputStream(theFile);
DataInputStream din = new DataInputStream(bais);
/**
* CREATE A DESERIALIZER FOR SAMPLE AMF REQUEST
*/
ActionMessage message = new ActionMessage();
trace.startRequest("----------Deserializing AMF/HTTP request-----");
AmfMessageDeserializer deserializer = new AmfMessageDeserializer();
deserializer.initialize(din, trace);
/**
* RECORD TIME TO DESERIALIZE THE SAMPLE MESSAGE AS OUR TEST
* METRIC...
*/
long start = System.currentTimeMillis();
deserializer.readMessage(message);
long finish = System.currentTimeMillis();
trace.endMessage();
long duration = finish - start;
/**
* PRINT TRACE OUTPUT
*/
System.out.print(trace.toString());
System.out.print("AMF Deserialization Time: " + duration + "ms");
System.out.println("===================================================");
}