commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BELUGA BEHR (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IO-454) IOUtils.skipToEnd
Date Tue, 05 Aug 2014 01:31:11 GMT

    [ https://issues.apache.org/jira/browse/IO-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085635#comment-14085635
] 

BELUGA BEHR commented on IO-454:
--------------------------------

{code}

    public static void skipToEnd(final InputStream is) throws IOException {
        
        while (0 != is.skip(Integer.MAX_VALUE));
        
        while (EOF != is.read(SKIP_BYTE_BUFFER));
    }

{code}

> 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)

Mime
View raw message