How to Flush an Android Emulator Input Buffer
The Java "flush" function lets you flush an Android emulator program's input buffer. A Java input buffer contains information you retrieve from a file or a website. The buffer holds the data in memory until you want to print the data to the screen or flush the buffer after you no longer need the stored data. You call the "flush" function with your input buffer variable to clear the buffer's data and memory usage.
Instructions
-
-
1
Open your Java editor and the project you want to edit on the desktop. Open the source code file that contains your buffer.
-
2
Scroll down to the end of the function that contains the buffer. If you flush the buffer before the code in the function is able to calculate the data, Java returns an error. Placing the code at the end of the function ensures that the buffer is cleared after processing.
-
-
3
Add the flush function to the buffer variable. Use the following code to add the function:
buffer.flush();
Replace "buffer" with the name of your own buffer variable.
-
1