commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damjan Jovanovic <dam...@apache.org>
Subject Re: [compress] 2.0: require Java7?
Date Sun, 26 Jan 2014 10:06:47 GMT
On Sun, Jan 26, 2014 at 8:13 AM, Stefan Bodewig <bodewig@apache.org> wrote:
> On 2014-01-25, Damjan Jovanovic wrote:
>
>> On Fri, Jan 24, 2014 at 6:06 PM, Stefan Bodewig <bodewig@apache.org> wrote:
>>> On 2013-12-30, Stefan Bodewig wrote:
>
>>>> Compress 1.x is at Java5, personally I don't think Java6 would give us
>>>> any benefits.  I don't know about the other improvements in NIO2 but the
>>>> java.nio.file package looks useful for compress.
>
>>> In the meantime it has been pointed out to me that Android doesn't
>>> support NIO2.  I can imagine Android apps using Compress so this looks
>>> like a good reason to hold back requiring Java7.
>
>> It's already possible to use most Java 7 language level features and
>> compile to Android (https://github.com/yareally/Java7-on-Android). It
>> would also possible to reimplement the needed classes (which is only
>> SeekableByteChannel?) in nio2 using some kind of wrapper on top of
>> Android's java.nio.
>
> It would also be a part java.nio.file.attribute, but we can re-invent
> that as well, if needed.  What you suggest could work as long as we are
> careful and never assume FileChannel implements SeekableByteChannel but
> use some custom File => SeekableByteChannel code using Java7 if
> available - I'm just afraid we'll forget to be careful.

Or, during compilation to Android, java.nio.channels.FileChannel could
get renamed to wrapper.FileChannel, which will implement
wrapper.SeekableByteChannel, so there's no problem.

>> We could still use Java 7 / nio2 and then make a plan for Android
>> releases.
>
> Thanks for volunteering ;-)

Heh :).

> Stefan
>

Damjan

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


Mime
View raw message