/** * Reads the given input class path entry. */ private void readInput(String messagePrefix, ClassPathEntry classPathEntry, DataEntryReader dataEntryReader) throws IOException { try { // Create a reader that can unwrap jars, wars, ears, jmods and zips. DataEntryReader reader = DataEntryReaderFactory.createDataEntryReader(messagePrefix, classPathEntry, dataEntryReader); // Create the data entry pump. DirectoryPump directoryPump = new DirectoryPump(classPathEntry.getFile()); // Pump the data entries into the reader. directoryPump.pumpDataEntries(reader); } catch (IOException ex) { throw (IOException)new IOException("Can't read [" + classPathEntry + "] (" + ex.getMessage() + ")").initCause(ex); } } }
public void pumpDataEntries(DataEntryReader dataEntryReader) throws IOException { if (!directory.exists()) { throw new IOException("No such file or directory: " + directory); } readFiles(directory, dataEntryReader); }
/** * Reads the given input class path entry. */ private void readInput(String messagePrefix, ClassPathEntry classPathEntry, DataEntryReader dataEntryReader) throws IOException { try { // Create a reader that can unwrap jars, wars, ears, jmods and zips. DataEntryReader reader = DataEntryReaderFactory.createDataEntryReader(messagePrefix, classPathEntry, dataEntryReader); // Create the data entry pump. DirectoryPump directoryPump = new DirectoryPump(classPathEntry.getFile()); // Pump the data entries into the reader. directoryPump.pumpDataEntries(reader); } catch (IOException ex) { throw (IOException)new IOException("Can't read [" + classPathEntry + "] (" + ex.getMessage() + ")").initCause(ex); } } }
public void pumpDataEntries(DataEntryReader dataEntryReader) throws IOException { if (!directory.exists()) { throw new IOException("No such file or directory"); } readFiles(directory, dataEntryReader); }
/** * Reads the given input class path entry. */ private void readInput(String messagePrefix, ClassPathEntry classPathEntry, DataEntryReader dataEntryReader) throws IOException { try { // Create a reader that can unwrap jars, wars, ears, and zips. DataEntryReader reader = DataEntryReaderFactory.createDataEntryReader(messagePrefix, classPathEntry, dataEntryReader); // Create the data entry pump. DirectoryPump directoryPump = new DirectoryPump(classPathEntry.getFile()); // Pump the data entries into the reader. directoryPump.pumpDataEntries(reader); } catch (IOException ex) { throw new IOException("Can't read [" + classPathEntry + "] (" + ex.getMessage() + ")"); } } }
public void pumpDataEntries(DataEntryReader dataEntryReader) throws IOException { if (!directory.exists()) { throw new IOException("No such file or directory: " + directory); } readFiles(directory, dataEntryReader); }
/** * Reads the given input class path entry. */ private void readInput(String messagePrefix, ClassPathEntry classPathEntry, DataEntryReader dataEntryReader) throws IOException { try { // Create a reader that can unwrap jars, wars, ears, jmods and zips. DataEntryReader reader = DataEntryReaderFactory.createDataEntryReader(messagePrefix, classPathEntry, dataEntryReader); // Create the data entry pump. DirectoryPump directoryPump = new DirectoryPump(classPathEntry.getFile()); // Pump the data entries into the reader. directoryPump.pumpDataEntries(reader); } catch (IOException ex) { throw (IOException)new IOException("Can't read [" + classPathEntry + "] (" + ex.getMessage() + ")").initCause(ex); } } }
public void pumpDataEntries(DataEntryReader dataEntryReader) throws IOException { if (!directory.exists()) { throw new IOException("No such file or directory: " + directory); } readFiles(directory, dataEntryReader); }
DirectoryPump directoryReader = new DirectoryPump(new File(input)); directoryReader.pumpDataEntries(reader);
/** * Reads the given subdirectory recursively, applying the given DataEntryReader * to all files that are encountered. */ private void readFiles(File file, DataEntryReader dataEntryReader) throws IOException { // Pass the file data entry to the reader. dataEntryReader.read(new FileDataEntry(directory, file)); if (file.isDirectory()) { // Recurse into the subdirectory. File[] files = file.listFiles(); for (int index = 0; index < files.length; index++) { readFiles(files[index], dataEntryReader); } } } }
DirectoryPump directoryReader = new DirectoryPump(new File(input)); directoryReader.pumpDataEntries(reader);
/** * Reads the given subdirectory recursively, applying the given DataEntryReader * to all files that are encountered. */ private void readFiles(File file, DataEntryReader dataEntryReader) throws IOException { // Pass the file data entry to the reader. dataEntryReader.read(new FileDataEntry(directory, file)); if (file.isDirectory()) { // Recurse into the subdirectory. File[] listedFiles = file.listFiles(); for (int index = 0; index < listedFiles.length; index++) { File listedFile = listedFiles[index]; try { readFiles(listedFile, dataEntryReader); } catch (IOException e) { throw new IOException("Can't read ["+listedFile.getName()+"] ("+e.getMessage()+")", e); } } } } }
DirectoryPump directoryReader = new DirectoryPump(new File(input)); directoryReader.pumpDataEntries(reader);
/** * Reads the given subdirectory recursively, applying the given DataEntryReader * to all files that are encountered. */ private void readFiles(File file, DataEntryReader dataEntryReader) throws IOException { // Pass the file data entry to the reader. dataEntryReader.read(new FileDataEntry(directory, file)); if (file.isDirectory()) { // Recurse into the subdirectory. File[] listedFiles = file.listFiles(); for (int index = 0; index < listedFiles.length; index++) { File listedFile = listedFiles[index]; try { readFiles(listedFile, dataEntryReader); } catch (IOException e) { throw new IOException("Can't read ["+listedFile.getName()+"] ("+e.getMessage()+")", e); } } } } }
DirectoryPump directoryReader = new DirectoryPump(new File(input)); directoryReader.pumpDataEntries(reader);
/** * Reads the given subdirectory recursively, applying the given DataEntryReader * to all files that are encountered. */ private void readFiles(File file, DataEntryReader dataEntryReader) throws IOException { // Pass the file data entry to the reader. dataEntryReader.read(new FileDataEntry(directory, file)); if (file.isDirectory()) { // Recurse into the subdirectory. File[] listedFiles = file.listFiles(); for (int index = 0; index < listedFiles.length; index++) { File listedFile = listedFiles[index]; try { readFiles(listedFile, dataEntryReader); } catch (IOException e) { throw new IOException("Can't read ["+listedFile.getName()+"] ("+e.getMessage()+")", e); } } } } }