Re: Why common-compress skip data by reading and discard?

2024-05-24 Thread Gili Tzabari
Another way you could support this is add an adapter that uses one 
approach or the other depending on the JDK version of the user. Use 
reflection to detect whether the new API exists or not.


Gili

On 2024-05-24 10:41, sebb wrote:

On Fri, 24 May 2024 at 14:51, iseki zero  wrote:

Thank you. It will better if we can do a detection before we call it, to
improve the performance.

Is there a performance issue here?
If so, is it enough to be worth the effort of updating the code?

Alternatively, it would be easy to update the Javadoc to advise users
who are on Java12+ to update their code to use the new methods...



On 2024/05/23 11:21:33 Gary Gregory wrote:
  > Hello iseki,
  >
  > The Javadoc explains all of this in detail.
  >
  > Java 12 adds skipNBytes and IO is still based on Java 8.
  >
  > Gary
  >
  > On Thu, May 23, 2024, 6:30 AM iseki zero  wrote:
  >
  > > Hello,
  > >
  > > When I reading the code of common-compress, I found it skip data using
  > > the `IOUtils.skip` in `commons-io` module.
  > >
  > > I found this method just reading the data and discard it directly. But
  > > in JDK there's an more effeciency method `InputStream.skip` and
  > > `InputStream.skipNBytes`.
  > >
  > > So why we read & discard data instead of call `skip*` directly?
  > >
  > > Thank you.
  > >
  > > iseki zero.
  > >
  > >
  > > -
  > > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
  > > For additional commands, e-mail: user-h...@commons.apache.org
  > >
  > >
  >

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


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



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



Re: Re: Why common-compress skip data by reading and discard?

2024-05-24 Thread sebb
On Fri, 24 May 2024 at 14:51, iseki zero  wrote:
>
> Thank you. It will better if we can do a detection before we call it, to
> improve the performance.

Is there a performance issue here?
If so, is it enough to be worth the effort of updating the code?

Alternatively, it would be easy to update the Javadoc to advise users
who are on Java12+ to update their code to use the new methods...


> On 2024/05/23 11:21:33 Gary Gregory wrote:
>  > Hello iseki,
>  >
>  > The Javadoc explains all of this in detail.
>  >
>  > Java 12 adds skipNBytes and IO is still based on Java 8.
>  >
>  > Gary
>  >
>  > On Thu, May 23, 2024, 6:30 AM iseki zero  wrote:
>  >
>  > > Hello,
>  > >
>  > > When I reading the code of common-compress, I found it skip data using
>  > > the `IOUtils.skip` in `commons-io` module.
>  > >
>  > > I found this method just reading the data and discard it directly. But
>  > > in JDK there's an more effeciency method `InputStream.skip` and
>  > > `InputStream.skipNBytes`.
>  > >
>  > > So why we read & discard data instead of call `skip*` directly?
>  > >
>  > > Thank you.
>  > >
>  > > iseki zero.
>  > >
>  > >
>  > > -
>  > > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>  > > For additional commands, e-mail: user-h...@commons.apache.org
>  > >
>  > >
>  >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>

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



RE: Re: Why common-compress skip data by reading and discard?

2024-05-24 Thread iseki zero
Thank you. It will better if we can do a detection before we call it, to 
improve the performance.


On 2024/05/23 11:21:33 Gary Gregory wrote:
> Hello iseki,
>
> The Javadoc explains all of this in detail.
>
> Java 12 adds skipNBytes and IO is still based on Java 8.
>
> Gary
>
> On Thu, May 23, 2024, 6:30 AM iseki zero  wrote:
>
> > Hello,
> >
> > When I reading the code of common-compress, I found it skip data using
> > the `IOUtils.skip` in `commons-io` module.
> >
> > I found this method just reading the data and discard it directly. But
> > in JDK there's an more effeciency method `InputStream.skip` and
> > `InputStream.skipNBytes`.
> >
> > So why we read & discard data instead of call `skip*` directly?
> >
> > Thank you.
> >
> > iseki zero.
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
>

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



[ANNOUNCEMENT] Commons Daemon 1.4.0 Released

2024-05-24 Thread Mark Thomas

The Apache Commons Team is pleased to announce the availability of
Apache Commons Daemon 1.4.0

The Apache Commons Daemon software library provides a generic Daemon
(unix) or Service (Windows) wrapper for Java code.

Version 1.4.0 raises the minimum supported version of Java to Java 8 and 
Windows to Windows 10 / Windows Server 2012. Version 1.4.0 also 
addresses a number of bugs.


A full list of changes can be found at
https://commons.apache.org/proper/commons-daemon/changes-report.html

Source and binary distributions are available for download from the
Apache Commons download site:

https://commons.apache.org/proper/commons-daemon/download_daemon.cgi

Please verify signatures using the KEYS file available at the above
location when downloading the release.

For complete information on Commons Daemon, including
instructions on how to submit bug reports, patches, or suggestions for
improvement, see the Apache Commons Daemon website:

https://commons.apache.org/proper/commons-daemon/

Mark
on behalf of the Apache Commons community

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



Re: New release for commons jexl

2024-05-24 Thread Henri Biestro


Starting preparations for a 3.4 release :-)
Henrib

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