protected String[] expandSources(Vector sources){ Vector expandedSources = new Vector(); Iterator iter = sources.iterator(); while (iter.hasNext()){ String v = (String)iter.next(); File f = new File(v); if (f.exists() && f.isDirectory()){ File[] fl = f.listFiles(new SVGConverter.SVGFileFilter()); for (int i=0; i<fl.length; i++){ expandedSources.addElement(fl[i].getPath()); } } else { expandedSources.addElement(v); } } String[] s = new String[expandedSources.size()]; expandedSources.copyInto(s); return s; }
/** * Scans the input vector and replaces directories with the list * of SVG files they contain */ protected String[] expandSources(List sources){ List expandedSources = new ArrayList(); for (Object source : sources) { String v = (String) source; File f = new File(v); if (f.exists() && f.isDirectory()) { File[] fl = f.listFiles(new SVGConverter.SVGFileFilter()); for (File aFl : fl) { expandedSources.add(aFl.getPath()); } } else { expandedSources.add(v); } } String[] s = new String[expandedSources.size()]; expandedSources.toArray( s ); return s; }
/** * Scans the input vector and replaces directories with the list * of SVG files they contain */ protected String[] expandSources(List sources){ List expandedSources = new ArrayList(); Iterator iter = sources.iterator(); while (iter.hasNext()){ String v = (String)iter.next(); File f = new File(v); if (f.exists() && f.isDirectory()){ File[] fl = f.listFiles(new SVGConverter.SVGFileFilter()); for (int i=0; i<fl.length; i++){ expandedSources.add(fl[i].getPath()); } } else { expandedSources.add(v); } } String[] s = new String[expandedSources.size()]; expandedSources.toArray( s ); return s; }
/** * Scans the input vector and replaces directories with the list * of SVG files they contain */ protected String[] expandSources(List sources){ List expandedSources = new ArrayList(); for (Object source : sources) { String v = (String) source; File f = new File(v); if (f.exists() && f.isDirectory()) { File[] fl = f.listFiles(new SVGConverter.SVGFileFilter()); for (File aFl : fl) { expandedSources.add(aFl.getPath()); } } else { expandedSources.add(v); } } String[] s = new String[expandedSources.size()]; expandedSources.toArray( s ); return s; }