/** * Returns a new ArchiveInputStream for reading archives. Subclasses can override this to return their own custom * implementation. * * @param archive the archive file to stream from * @return a new ArchiveInputStream for the given archive file * @throws IOException propagated IO exceptions */ protected ArchiveInputStream createArchiveInputStream(File archive) throws IOException { try { return CommonsStreamFactory.createArchiveInputStream(archive); } catch (ArchiveException e) { throw new IOException(e); } }
/** * Returns a new ArchiveInputStream for reading archives. Subclasses can override this to return their own custom * implementation. * * @param archive the archive contents to stream from * @return a new ArchiveInputStream for the given archive file * @throws IOException propagated IO exceptions */ protected ArchiveInputStream createArchiveInputStream(InputStream archive) throws IOException { try { return CommonsStreamFactory.createArchiveInputStream(archive); } catch (ArchiveException e) { throw new IOException(e); } }
/** * Returns a new ArchiveInputStream for reading archives. Subclasses can override this to return their own custom * implementation. * * @param archive the archive contents to stream from * @return a new ArchiveInputStream for the given archive file * @throws IOException propagated IO exceptions */ protected ArchiveInputStream createArchiveInputStream(InputStream archive) throws IOException { try { return CommonsStreamFactory.createArchiveInputStream(archive); } catch (ArchiveException e) { throw new IOException(e); } }
/** * Returns a new ArchiveInputStream for reading archives. Subclasses can override this to return their own custom * implementation. * * @param archive the archive file to stream from * @return a new ArchiveInputStream for the given archive file * @throws IOException propagated IO exceptions */ protected ArchiveInputStream createArchiveInputStream(File archive) throws IOException { try { return CommonsStreamFactory.createArchiveInputStream(archive); } catch (ArchiveException e) { throw new IOException(e); } }
/** * Uses the {@link ArchiveStreamFactory} to create a new {@link ArchiveInputStream} for the given archive file. * * @param archive the archive file * @return a new {@link ArchiveInputStream} for the given archive file * @throws IOException propagated IOException when creating the FileInputStream. * @throws ArchiveException if the archiver name is not known */ static ArchiveInputStream createArchiveInputStream(File archive) throws IOException, ArchiveException { return createArchiveInputStream(new BufferedInputStream(new FileInputStream(archive))); }
/** * Uses the {@link ArchiveStreamFactory} to create a new {@link ArchiveInputStream} for the given archive file. * * @param archive the archive file * @return a new {@link ArchiveInputStream} for the given archive file * @throws IOException propagated IOException when creating the FileInputStream. * @throws ArchiveException if the archiver name is not known */ static ArchiveInputStream createArchiveInputStream(File archive) throws IOException, ArchiveException { return createArchiveInputStream(new BufferedInputStream(new FileInputStream(archive))); }
/** * @see {@link ArchiveStreamFactory#createArchiveInputStream(String, InputStream)} */ static ArchiveInputStream createArchiveInputStream(ArchiveFormat archiveFormat, InputStream in) throws ArchiveException { return createArchiveInputStream(archiveFormat.getName(), in); }
/** * @see {@link ArchiveStreamFactory#createArchiveInputStream(String, InputStream)} */ static ArchiveInputStream createArchiveInputStream(ArchiveFormat archiveFormat, InputStream in) throws ArchiveException { return createArchiveInputStream(archiveFormat.getName(), in); }
/** * @see {@link ArchiveStreamFactory#createArchiveInputStream(String, InputStream)} */ static ArchiveInputStream createArchiveInputStream(CommonsArchiver archiver, InputStream in) throws ArchiveException { return createArchiveInputStream(archiver.getArchiveFormat(), in); }
/** * @see {@link ArchiveStreamFactory#createArchiveInputStream(String, InputStream)} */ static ArchiveInputStream createArchiveInputStream(CommonsArchiver archiver, InputStream in) throws ArchiveException { return createArchiveInputStream(archiver.getArchiveFormat(), in); }
@Override public ArchiveStream stream(File archive) throws IOException { try { return new CommonsArchiveStream(createArchiveInputStream(archiver, createCompressorInputStream(archive))); } catch (ArchiveException e) { throw new IOException(e); } catch (CompressorException e) { throw new IOException(e); } }
@Override public ArchiveStream stream(File archive) throws IOException { try { return new CommonsArchiveStream(createArchiveInputStream(archiver, createCompressorInputStream(archive))); } catch (ArchiveException e) { throw new IOException(e); } catch (CompressorException e) { throw new IOException(e); } }