You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Otto Fowler (JIRA)" <ji...@apache.org> on 2018/02/24 13:55:00 UTC

[jira] [Commented] (VFS-119) Stream closed by the monitor

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

Otto Fowler commented on VFS-119:
---------------------------------

There is a PR for VFS-614

> Stream closed by the monitor
> ----------------------------
>
>                 Key: VFS-119
>                 URL: https://issues.apache.org/jira/browse/VFS-119
>             Project: Commons VFS
>          Issue Type: Bug
>            Reporter: Philippe Poulard
>            Assignee: Otto Fowler
>            Priority: Major
>
> java.io.IOException: Stream closed
> is thrown when processing a local file
> 1-create a local file file:///exemple.txt
> 2-get the input stream : is
> 3-set a mark : is.mark(1024)
> 4-read the file until the end
> 5-reset the mark : is.reset()
> the exception is thrown
> here is a sample code :
>         InputStream is = f.getInputStream();
>         is.mark( 1024 );
>         while (true) {
>             int data = is.read();
>             if (data == -1) break;
>         }
>         is.reset();



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)