commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Poulard (JIRA)" <j...@apache.org>
Subject [jira] Commented: (VFS-119) Stream closed by the monitor
Date Mon, 16 Nov 2009 08:08:41 GMT

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

Philippe Poulard commented on VFS-119:
--------------------------------------


Hi,

I didn't dive into VFS for a while, but I remember there were some 
wrappers used around input streams; but I'm not sure...



-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !


> 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
>            Priority: Blocker
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message