All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tools.sniffer.SniffMessageList Maven / Gradle / Ivy

There is a newer version: 1.3.0-91
Show newest version
package tools.sniffer;

import java.util.*;

/**
 *A list of Sniff messages. Each one corresponds to a call Id.
 * Acknowledgement:
 * This code was contributed by Tim Bardzil .
 * This code was completed as part of a class project in TLEN 5843
 * Singaling Protocols, taught by Professor Douglas C. Sicker, Ph.D. at
 * the University of Colorado, Boulder.
 * Minor modifications to the code were made by M. Ranganathan .
 *
 *@author Tim Bardzil 
 */
public class SniffMessageList extends ArrayList {
    protected static String fileName;

    public String getCallID() {
        SniffMessage temp = (SniffMessage) super.get(0);
        return temp.getCallID();
    }

    public String toXML() {

        String xmlMessages = new String();
        ListIterator i = super.listIterator();
        while (i.hasNext()) {
            xmlMessages += ((SniffMessage) i.next()).toXML();
        }

        return xmlMessages;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy