470,833 Members | 1,337 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Question on the flush method

According to Sun's web site, the flush method of the OutputStream object
does nothing.

So, what does actually happens when you call it?
At times I may see different behavior when including it within a program
(some times a socket read error) which I would think is strange esspecially
if the method is not supposed to do anything.

Any ideas?
Jul 17 '05 #1
3 7139
some subClasses may used it (FilterOutputStream)

On Tue, 16 Sep 2003 12:06:17 GMT, JnlSeb <jn****@earthlink.net> wrote:
According to Sun's web site, the flush method of the OutputStream object
does nothing.

So, what does actually happens when you call it?
At times I may see different behavior when including it within a program
(some times a socket read error) which I would think is strange
esspecially
if the method is not supposed to do anything.

Any ideas?


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 17 '05 #2
In general a flush method is used to force
data (if there is any) from buffers to a file or device.

"JnlSeb" <jn****@earthlink.net> wrote in message
news:Z0****************@newsread4.news.pas.earthli nk.net...
According to Sun's web site, the flush method of the OutputStream object
does nothing.

So, what does actually happens when you call it?
At times I may see different behavior when including it within a program
(some times a socket read error) which I would think is strange esspecially if the method is not supposed to do anything.

Any ideas?

Jul 17 '05 #3


JnlSeb wrote:
According to Sun's web site, the flush method of the OutputStream object
does nothing.

So, what does actually happens when you call it?
At times I may see different behavior when including it within a program
(some times a socket read error) which I would think is strange esspecially
if the method is not supposed to do anything.

Any ideas?


I'd hate to sound pedantic, but none of the methods of OutputStream do
anything, since OutputStream is an interface. They're just guidelines.

In theory, I could write an implementation of OutputStream that did
complex math, but, what would the point be? Besides, complex math makes
my head hurt. >_<

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Freeserve | last post: by
15 posts views Thread by designconcepts | last post: by
1 post views Thread by DalePres | last post: by
15 posts views Thread by googlegroups | last post: by
3 posts views Thread by =?Utf-8?B?R2Vvcmdl?= | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.