Code example for Vector

Methods: addElement, contains

0
    public SplitterException() { 
        // empty constructor 
    } 
 
    public void add(OutputStream s, Exception e) {
        if (streams.contains(s)) {
            System.err.println("AAA, stream was already in splitter exception");
        } 
 
        streams.addElement(s);
        exceptions.addElement(e);
    } 
 
    public int count() { 
        return streams.size();
    } 
 
    public OutputStream[] getStreams() {
    	OutputStream[] ret = new OutputStream[streams.size()];
    	for (int i = 0; i < streams.size(); i++) {
    		ret[i] = (OutputStream)streams.elementAt(i);