On 2014-01-22, Damjan Jovanovic wrote:

> On Wed, Jan 8, 2014 at 4:41 PM, Stefan Bodewig <bode...@apache.org> wrote:

>> * Checked vs Unchecked exceptions

>>   I would love to make ArchiveInput be an Iterator over the entries but
>>   can't do so as the things we'd need to do in next() might throw an
>>   IOException.  One option may be to introduce an unchecked
>>   ArchiveException and wrap al checked exceptions (and do so throughout
>>   the API).

> Doesn't sound very appealing.

No it doesn't.  I don't see any other option for implementing Iterator,
though.  So be it.

>> * I'm not sure about ArchiveInput#getChannel

>>   Should next return a Pair of ArchiveEntry and Channel instead?

> I don't think so, you might not want to look at an ArchiveEntry's
> contents, or it might be empty.

True.

Any opinion on Channel vs InputStream?

After implementing a few more things it seems we'd need to re-invent the
Stream infrastructure (Filter, Pushback, mark-reset) to bring back stuff
like bounds or checksum verification.  Those re-invented classes would
be good for [IO] IMHO but would slow down development.

Still not sure which way to go.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to