commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <>
Subject [jira] [Commented] (COMPRESS-269) Common interface for SevenZFile and ArchiveInputStream
Date Fri, 14 Mar 2014 14:07:43 GMT


Stefan Bodewig commented on COMPRESS-269:

We discussed the "let SevenZFile implement ArchiveInputStream" idea when we added 7z support
and decided against it as it is not an InputStream.

My current line of thinking can be found in the compress2 Branch in svn
here ArchiveInput is not a stream or a channel but provides channels per entry.  This interface
can easily be implemented by SevenZFile as well as the more traditional streams.  SevenZFile
will likely even implement RandomAccessArchiveInput (as would ZipFile).

For the past two months my focus has been in other places (like cutting Compress 1.8) but
I plan to come back to compress2 soon.  Your input (Nick's as well as the broader Tika community's)
on dev@commons would be extremely valuable.  So far we seem to be determined to require Java7
and go with Channels rather than streams (so we may benefit from SeekableByteChannel as a
generalization of RandomAccessFile).

> Common interface for SevenZFile and ArchiveInputStream
> ------------------------------------------------------
>                 Key: COMPRESS-269
>                 URL:
>             Project: Commons Compress
>          Issue Type: Improvement
>          Components: Archivers
>    Affects Versions: 1.8
>            Reporter: Nick Burch
>            Priority: Minor
> Both SevenZFile and ArchiveInputStream (effectively) have a method on them:
> ArchiveEntry getNextEntry()
> However, they don't share a common interface or parent which defines this, so it isn't
possible to write generic code which would work with either to read archive entries out
> For Apache Tika, it would be good if after our 7z specific opening code, we could then
use common code to read out and process the archive entries no matter what the archive format

This message was sent by Atlassian JIRA

View raw message