472,328 Members | 1,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

flush() function uses in java

kaleeswaran
132 100+
wat is use of flush() fun in java
Mar 27 '07 #1
7 23181
r035198x
13,262 8TB
wat is use of flush() fun in java
Be more specific. What flush fun are you talking about?
Mar 27 '07 #2
kaleeswaran
132 100+
i don't know much about this flush() function..
i hve seen it most of the java programs...
so i would like to know about this that's all....
"System.out.flush()"
Mar 28 '07 #3
r035198x
13,262 8TB
i don't know much about this flush() function..
i hve seen it most of the java programs...
so i would like to know about this that's all....
"System.out.flush()"
Read about it here .
Mar 28 '07 #4
Mainly in Java flush() is used to empty the buffer data between the server and the client.
Syntex for using this function is:

private DataOutputStream toServer;
toServer = new DataOutputStream(socket.getOutputStream());
double radius =5.0;
// Send the radius to the server
toServer.writeDouble(radius);
toServer.flush();
Oct 15 '10 #5
Thejas
1
@r035198x
In java There will a buffer.when u write data to file or console it will initiall write to buffer then to file or console

Untill we use flush() method it will not be written into destination(file or console) from buffer
Nov 3 '11 #6
Nicool
1
For performance issue, first data is to be written into Buffer. When buffer get full then data is written to output (File,console etc.). When buffer is partially filled and you want to send it to output(file,console) then you need to call flush() method manually in order to write partially filled buffer to output(file,console).
Nov 30 '11 #7
Thanks Ali Akram for your example.
Sep 20 '12 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jon Spivey | last post by:
Experimenting with response.flush() but can't seem to get it to work. This code <% response.write "<p>started</p>" response.flush() for i = 1 to...
1
by: Victor Irzak | last post by:
Hello, I have a g++-3.3.1 compiler (latest). I can't figure the type of endl, ends, flush. Here is my program. It compiles with VS.NET, Intel...
0
by: Jean Hagen | last post by:
I'm trying to write a script to weekly remove MySQL logs, the general, error and binary log files. Following the MySQL documentation, I've...
30
by: Jonathan Neill | last post by:
I'm aware that there is no ANSI (or POSIX, or any standard, to my knowledge) way of flushing stdin or any other application-level input buffer, but...
5
by: Luiz Vianna | last post by:
Guys, I need to send some info to my client while I'm processing some stuff. The flow will be something like : -process -response -process ...
1
by: Tom | last post by:
Do I really need to flush a streamwriter? It appears to work either way. Dim sw As StreamWriter Dim strFullPath As String = "C:\Temp\Test.txt" ...
1
by: nitroamos | last post by:
i'm working on improving the IO for the software project i'm working on to do two extra things. first, i'm going to add HDF5 functionality, and...
12
by: Daniel Kaplan | last post by:
I was curious about something. In the same table cell I can say this: <A HREF="menu.pl" ><IMG SRC="menu.jpg" width="95" height="35"...
2
by: Damir | last post by:
Hello! I have noticed that after (sucessfully) executing the command: FLUSH PACKAGE CACHE DYNAMIC the dynamic SQL statement cache is not...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.