You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Mario Ivankovits (JIRA)" <ji...@apache.org> on 2007/03/19 20:43:32 UTC
[jira] Resolved: (VFS-111) Closed OutputStream from FileContent
does not throw IOException if further written to
[ https://issues.apache.org/jira/browse/VFS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Ivankovits resolved VFS-111.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.1
I've added a check if the file has been closed to our MonitorOutputStream, so now it will fail fast.
Thanks for pointing it out.
Ciao,
Mario
> Closed OutputStream from FileContent does not throw IOException if further written to
> -------------------------------------------------------------------------------------
>
> Key: VFS-111
> URL: https://issues.apache.org/jira/browse/VFS-111
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.0
> Environment: Windows XP, Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
> Reporter: Dr. Christian Möller
> Fix For: 1.1
>
>
> I've a question regarding the behaviour of OutputStreams received from
> org.apache.commons.vfs.FileContent.getOutputStream(): If I call close()
> on them and further write some bytes to the stream, these writes take
> place silently without throwing an IOException (as it is done by "usual"
> Java streams like java.io.FileOutputStream); the data written after close()
> has been called does not appear in the target file, neither.
> As an example:
> byte[] SOME_BYTES = new byte[]{70, 71, 72};
> FileObject tmpFile = VFS.getManager().resolveFile("tmp:test.txt");
> OutputStream os = tmpFile.getContent().getOutputStream();
> os.write(SOME_BYTES);
> os.close();
> os.write(SOME_BYTES); // Neither IOE is thrown nor bytes are written
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org