/** IntList class // This class assembles lists of integers - primarily for // testing **/ package ciips.animation; import java.awt.*; import java.io.*; import java.net.*; import java.util.*; public class IntList { protected int nodes_array[]; protected BufferedReader br; protected int num = 0; private static final boolean DEBUG = false; public IntList() { // Construct an empty list } public IntList( URL url ) { InputStreamReader isr; try { URLConnection urlc = url.openConnection(); isr = new InputStreamReader( urlc.getInputStream() ); br = new BufferedReader( isr ); num = loadNodes( br ); } catch( IOException e ) { System.out.println("IntList: URL connection error"); } } /** Construct an integer list from a string containing a space separated list of integers **/ public IntList( String line ) throws Exception { String item1; Vector x = new Vector( 10 ); if( DEBUG ) System.out.println("IntList: line [" + line + "]" ); StringTokenizer Data = new StringTokenizer(line, " "); while( Data.hasMoreTokens() ) { item1 = Data.nextToken(); if ( item1 == null ) break; if( DEBUG ) System.out.println("IntList - item [" + item1 + "]"); // x.add( item1 ); x.addElement( item1 ); } num = x.size(); if( DEBUG ) System.out.println("IntList - found " + num + " items" ); if ( num > 0 ) { nodes_array = new int[ num ]; for(int k=0;k