public void closeInputStream() throws IOException { dataEntry.closeInputStream(); }
public InputStream getInputStream() throws IOException { return dataEntry.getInputStream(); }
public String getName() { return wrappedEntry.getName(); }
public void read(DataEntry dataEntry) throws IOException { try { if (dataEntry.isDirectory()) { dataEntryWriter.createDirectory(dataEntry); } else { // Get the output entry corresponding to this input entry. OutputStream outputStream = dataEntryWriter.getOutputStream(dataEntry); if (outputStream != null) { InputStream inputStream = dataEntry.getInputStream(); // Copy the data from the input entry to the output entry. copyData(inputStream, outputStream); // Close the data entries. dataEntry.closeInputStream(); } } } catch (IOException ex) { System.err.println("Warning: can't write resource [" + dataEntry.getName() + "] (" + ex.getMessage() + ")"); } }
InputStream inputStream = dataEntry.getInputStream(); if (className != null) String dataEntryName = dataEntry.getName(); if (!dataEntryName.equals("module-info.class") && !dataEntryName.replace(File.pathSeparatorChar, ClassConstants.PACKAGE_SEPARATOR).equals(className + ClassConstants.CLASS_FILE_EXTENSION) && "Warning: class [" + dataEntry.getName() + "] unexpectedly contains class [" + ClassUtil.externalClassName(className) + "]"); dataEntry.closeInputStream(); throw (IOException)new IOException("Can't process class ["+dataEntry.getName()+"] ("+ex.getMessage()+")").initCause(ex);
public DataEntry getParent() { return dataEntry.getParent(); }
dataEntry.getInputStream().read(new byte[4]); ZipInputStream zipInputStream = new ZipInputStream(dataEntry.getInputStream()); dataEntry.closeInputStream();
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); } } }
public boolean accepts(DataEntry dataEntry) { return dataEntry != null && dataEntry.isDirectory(); } }
public String getOriginalName() { return wrappedEntry.getOriginalName(); }
public long getSize() { return wrappedEntry.getSize(); }
if (dataEntry.isDirectory()) InputStream inputStream = dataEntry.getInputStream(); dataEntry.closeInputStream(); System.err.println("Warning: can't write resource [" + dataEntry.getName() + "] (" + ex.getMessage() + ")"); throw (IOException)new IOException("Can't write resource ["+dataEntry.getName()+"] ("+ex.getMessage()+")").initCause(ex);
InputStream inputStream = dataEntry.getInputStream(); if (className != null) if (!dataEntry.getName().replace(File.pathSeparatorChar, ClassConstants.INTERNAL_PACKAGE_SEPARATOR).equals(className+ClassConstants.CLASS_FILE_EXTENSION) && warningPrinter != null) "Warning: class [" + dataEntry.getName() + "] unexpectedly contains class [" + ClassUtil.externalClassName(className) + "]"); dataEntry.closeInputStream(); throw new IOException("Can't process class ["+dataEntry.getName()+"] ("+ex.getMessage()+")");
public DataEntry getParent() { return wrappedEntry.getParent(); }
dataEntry.getInputStream().read(new byte[4]); ZipInputStream zipInputStream = new ZipInputStream(dataEntry.getInputStream()); dataEntry.closeInputStream();
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 boolean accepts(DataEntry dataEntry) { return dataEntry != null && dataEntry.isDirectory(); } }
public String getOriginalName() { return wrappedEntry.getOriginalName(); }