[
https://issues.apache.org/jira/browse/IO-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14083828#comment-14083828
]
BELUGA BEHR commented on IO-454:
--------------------------------
Julien,
Interesting use of NullOutputStream! That seems like a handy trick I'll have
to recall at some point.
Sebb,
This utility goes hand-in-hand with some of the stuff I've worked on in Commons
Compress. An example is the TarArchiveInputStream. If the user calls the
"getNextEntry()" method, then the stream must skip to the end of the current
entry boundary. One just wants to skip, but not actually close the stream as
there may be addtional tar entries. I have written this in
TarArchiveInputStream as inputStream.skip(Long.MAX_VALUE) which assumes that a
stream will never be longer than MAX_VALUE. It would be better to just have a
way to skip.
This is useful when using any kind of bounded InputStream that sits on top of
another InputStream to skip to the next boundary.
> IOUtils.skipToEnd
> -----------------
>
> Key: IO-454
> URL: https://issues.apache.org/jira/browse/IO-454
> Project: Commons IO
> Issue Type: New Feature
> Components: Utilities
> Reporter: BELUGA BEHR
> Priority: Minor
>
> Hello,
> I'd like to see an IOUtils method that calls skip (or skip/read) on a stream
> until it returns -1.
> Thanks.
--
This message was sent by Atlassian JIRA
(v6.2#6252)