public void read(DataEntry dataEntry) throws IOException { // Delegate to the actual data entry reader. dataEntryReader.read(renamedDataEntry(dataEntry)); }
public void read(DataEntry dataEntry) throws IOException { DataEntryReader dataEntryReader = dataEntryFilter.accepts(dataEntry) ? acceptedDataEntryReader : rejectedDataEntryReader; if (dataEntryReader != null) { dataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { DataEntryReader dataEntryReader = dataEntryFilter.accepts(dataEntry) ? acceptedDataEntryReader : rejectedDataEntryReader; if (dataEntryReader != null) { dataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { DataEntryReader dataEntryReader = dataEntryFilter.accepts(dataEntry) ? acceptedDataEntryReader : rejectedDataEntryReader; if (dataEntryReader != null) { dataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { DataEntryReader dataEntryReader = dataEntryFilter.accepts(dataEntry) ? acceptedDataEntryReader : rejectedDataEntryReader; if (dataEntryReader != null) { dataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { // Strip the prefix if necessary. String name = dataEntry.getName(); if (name.startsWith(prefix)) { dataEntry = new RenamedDataEntry(dataEntry, name.substring(prefix.length())); } // Read the data entry. dataEntryReader.read(dataEntry); } }
public void read(DataEntry dataEntry) throws IOException { // Strip the prefix if necessary. String name = dataEntry.getName(); if (name.startsWith(prefix)) { dataEntry = new RenamedDataEntry(dataEntry, name.substring(prefix.length())); } // Read the data entry. dataEntryReader.read(dataEntry); } }
public void read(DataEntry dataEntry) throws IOException { // Strip the prefix if necessary. String name = dataEntry.getName(); if (name.startsWith(prefix)) { dataEntry = new RenamedDataEntry(dataEntry, name.substring(prefix.length())); } // Read the data entry. dataEntryReader.read(dataEntry); } }
/** * 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); } } } }
/** * 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); } } } } }
public void read(DataEntry dataEntry) throws IOException { String name = dataEntry.getName(); // Add a directory separator if necessary. if (dataEntry.isDirectory() && name.length() > 0) { name += ClassConstants.INTERNAL_PACKAGE_SEPARATOR; } String newName = (String)nameMap.get(name); if (newName != null) { // Add remove the directory separator if necessary. if (dataEntry.isDirectory() && newName.length() > 0) { newName = newName.substring(0, newName.length() - 1); } renamedDataEntryReader.read(new RenamedDataEntry(dataEntry, newName)); } else if (missingDataEntryReader != null) { missingDataEntryReader.read(dataEntry); } } }
/** * 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); } } } } }
/** * 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); } } } } }
public void read(DataEntry dataEntry) throws IOException { String name = dataEntry.getName(); // Add a directory separator if necessary. if (dataEntry.isDirectory() && name.length() > 0) { name += ClassConstants.PACKAGE_SEPARATOR; } String newName = (String)nameMap.get(name); if (newName != null) { // Remove the directory separator if necessary. if (dataEntry.isDirectory() && newName.length() > 0) { newName = newName.substring(0, newName.length() - 1); } dataEntryReader.read(new RenamedDataEntry(dataEntry, newName)); } else if (missingDataEntryReader != null) { missingDataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { String name = dataEntry.getName(); // Add a directory separator if necessary. if (dataEntry.isDirectory() && name.length() > 0) { name += ClassConstants.PACKAGE_SEPARATOR; } String newName = (String)nameMap.get(name); if (newName != null) { // Remove the directory separator if necessary. if (dataEntry.isDirectory() && newName.length() > 0) { newName = newName.substring(0, newName.length() - 1); } dataEntryReader.read(new RenamedDataEntry(dataEntry, newName)); } else if (missingDataEntryReader != null) { missingDataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { String name = dataEntry.getName(); // Add a directory separator if necessary. if (dataEntry.isDirectory() && name.length() > 0) { name += ClassConstants.PACKAGE_SEPARATOR; } String newName = (String)nameMap.get(name); if (newName != null) { // Remove the directory separator if necessary. if (dataEntry.isDirectory() && newName.length() > 0) { newName = newName.substring(0, newName.length() - 1); } dataEntryReader.read(new RenamedDataEntry(dataEntry, newName)); } else if (missingDataEntryReader != null) { missingDataEntryReader.read(dataEntry); } } }
public void read(DataEntry dataEntry) throws IOException { ZipInputStream zipInputStream = new ZipInputStream(dataEntry.getInputStream()); try { // Get all entries from the input jar. while (true) { // Can we get another entry? ZipEntry zipEntry = zipInputStream.getNextEntry(); if (zipEntry == null) { break; } // Delegate the actual reading to the data entry reader. dataEntryReader.read(new ZipDataEntry(dataEntry, zipEntry, zipInputStream)); } } finally { dataEntry.closeInputStream(); } } }
dataEntryReader.read(new ZipDataEntry(dataEntry, zipEntry, zipInputStream));
dataEntryReader.read(new ZipDataEntry(dataEntry, zipEntry, zipInputStream));
dataEntryReader.read(new ZipDataEntry(dataEntry, zipEntry, zipInputStream));