List<I_Entry> list = queue.peek(numOfEntries, -1);
if (list.size() == 0)
return new String[] { "Peeking messages from " + label + " queue failed, the reason is not known" };
MsgFileDumper dumper = new MsgFileDumper();
if (path == null || path.equalsIgnoreCase("String"))
path = "";
dumper.init(this, path);
ArrayList tmpList = new ArrayList();
for (int i=0; i<list.size(); i++) {
ReferenceEntry entry = (ReferenceEntry)list.get(i);
MsgUnitWrapper wrapper = entry.getMsgUnitWrapper();
if (wrapper == null) {
tmpList.add("NOT REFERENCED #" + i + " " + entry.getInfoWithoutMeat());
}
else {
String fileName = dumper.store(wrapper);
tmpList.add(fileName);
}
}
return (String[])tmpList.toArray(new String[tmpList.size()]);