/** * Parses a token to a file (or a set of files) * and add them as {@link InputSource} to the specified list. * * @param suffix If the given token is a directory name, we do a recusive search * and find all files that have the given suffix. */ private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException { Object src; try { src = Util.getFileOrURL(name); } catch (IOException e) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_NOT_A_FILE_NOR_URL(name)); } if (src instanceof URL) { target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm())))); } else { File fsrc = (File) src; if (fsrc.isDirectory()) { addRecursive(fsrc, suffix, target); } else { target.add(absolutize(fileToInputSource(fsrc))); } } }
/** * Parses a token to a file (or a set of files) * and add them as {@link InputSource} to the specified list. * * @param suffix If the given token is a directory name, we do a recusive search * and find all files that have the given suffix. */ private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException { Object src; try { src = Util.getFileOrURL(name); } catch (IOException e) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_NOT_A_FILE_NOR_URL(name)); } if (src instanceof URL) { target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm())))); } else { File fsrc = (File) src; if (fsrc.isDirectory()) { addRecursive(fsrc, suffix, target); } else { target.add(absolutize(fileToInputSource(fsrc))); } } }
/** * Parses a token to a file (or a set of files) * and add them as {@link InputSource} to the specified list. * * @param suffix If the given token is a directory name, we do a recusive search * and find all files that have the given suffix. */ private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException { Object src; try { src = Util.getFileOrURL(name); } catch (IOException e) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_NOT_A_FILE_NOR_URL(name)); } if (src instanceof URL) { target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm())))); } else { File fsrc = (File) src; if (fsrc.isDirectory()) { addRecursive(fsrc, suffix, target); } else { target.add(absolutize(fileToInputSource(fsrc))); } } }
/** * Parses a token to a file (or a set of files) * and add them as {@link InputSource} to the specified list. * * @param suffix If the given token is a directory name, we do a recusive search * and find all files that have the given suffix. */ private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException { Object src; try { src = Util.getFileOrURL(name); } catch (IOException e) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_NOT_A_FILE_NOR_URL(name)); } if (src instanceof URL) { target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm())))); } else { File fsrc = (File) src; if (fsrc.isDirectory()) { addRecursive(fsrc, suffix, target); } else { target.add(absolutize(fileToInputSource(fsrc))); } } }