Re: [VFS] Closed OutputStream from FileContent does not throw IOException if further written to

2007-02-15 Thread Christian Möller
Mario Ivankovits schrieb:
> Hi Christian!
>> os.write(SOME_BYTES);
>> os.close();
>> os.write(SOME_BYTES); // Neither IOE is thrown nor bytes are written
>>
>> Why?
>>   
> No idea, lets have a look at it. Could you please file a bug report in
> JIRA [1] (maybe with patch attached ;-) )

Done: VFS-111

Sorry, but there is no patch available on my disk. As a first step I'm
currently downlaoding SVN trunk of VFS ;-)

Greetings

Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VFS] Closed OutputStream from FileContent does not throw IOException if further written to

2007-02-15 Thread Mario Ivankovits
Hi Christian!
> os.write(SOME_BYTES);
> os.close();
> os.write(SOME_BYTES); // Neither IOE is thrown nor bytes are written
>
> Why?
>   
No idea, lets have a look at it. Could you please file a bug report in
JIRA [1] (maybe with patch attached ;-) )

Thanks!
Ciao,
Mario


[1] http://issues.apache.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[VFS] Closed OutputStream from FileContent does not throw IOException if further written to

2007-02-15 Thread Christian Möller
Hi,

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

Why?

It brakes my code which gives the OutputStream to some clients expecting
that they are receiving an IOE if the stream has been closed.

Greetings

Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]