/** * Returns a new ArchiveOutputStream for creating archives. Subclasses can override this to return their own custom * implementation. * * @param archiveFile the archive file to stream to * @return a new ArchiveOutputStream for the given archive file. * @throws IOException propagated IO exceptions */ protected ArchiveOutputStream createArchiveOutputStream(File archiveFile) throws IOException { try { return CommonsStreamFactory.createArchiveOutputStream(this, archiveFile); } catch (ArchiveException e) { throw new IOException(e); } }
/** * Returns a new ArchiveOutputStream for creating archives. Subclasses can override this to return their own custom * implementation. * * @param archiveFile the archive file to stream to * @return a new ArchiveOutputStream for the given archive file. * @throws IOException propagated IO exceptions */ protected ArchiveOutputStream createArchiveOutputStream(File archiveFile) throws IOException { try { return CommonsStreamFactory.createArchiveOutputStream(this, archiveFile); } catch (ArchiveException e) { throw new IOException(e); } }
static ArchiveOutputStream createArchiveOutputStream(ArchiveFormat format, File archive) throws IOException, ArchiveException { return createArchiveOutputStream(format.getName(), new FileOutputStream(archive)); }
static ArchiveOutputStream createArchiveOutputStream(ArchiveFormat format, File archive) throws IOException, ArchiveException { return createArchiveOutputStream(format.getName(), new FileOutputStream(archive)); }
/** * Uses the {@link ArchiveStreamFactory} and the name of the given archiver to create a new * {@link ArchiveOutputStream} for the given archive {@link File}. * * @param archiver the invoking archiver * @param archive the archive file to create the {@link ArchiveOutputStream} for * @return a new {@link ArchiveOutputStream} * @throws IOException propagated IOExceptions when creating the FileOutputStream. * @throws ArchiveException if the archiver name is not known */ static ArchiveOutputStream createArchiveOutputStream(CommonsArchiver archiver, File archive) throws IOException, ArchiveException { return createArchiveOutputStream(archiver.getArchiveFormat(), archive); }
/** * Uses the {@link ArchiveStreamFactory} and the name of the given archiver to create a new * {@link ArchiveOutputStream} for the given archive {@link File}. * * @param archiver the invoking archiver * @param archive the archive file to create the {@link ArchiveOutputStream} for * @return a new {@link ArchiveOutputStream} * @throws IOException propagated IOExceptions when creating the FileOutputStream. * @throws ArchiveException if the archiver name is not known */ static ArchiveOutputStream createArchiveOutputStream(CommonsArchiver archiver, File archive) throws IOException, ArchiveException { return createArchiveOutputStream(archiver.getArchiveFormat(), archive); }