• Post Reply Bookmark Topic Watch Topic
  • New Topic

Buffer and InputStream  RSS feed

 
Harold Ferguson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, hi to all the forum! :-)
I would to say anything about buffers.
Then,they are used to temporary store something for speedup operations. So if a device transmits slower than another,all data are stored in the buffer and at a certain point, the buffer is flushed.

The previous was an example of output buffer. In the case of an input buffer, for example when a device faster than another should receive a bunch of data, it (the faster) can use that ( the input buffer).
But, you can do me an example of an input buffer use in Java?
 
harshvardhan ojha
Ranch Hand
Posts: 157
1
Android Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Buffered Streams give it a try.
 
Harold Ferguson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
harshvardhan ojha wrote:Buffered Streams give it a try.

I haven't understand only what it means when it says
"the native input API is called only when the buffer is empty. Similarly, buffered output streams write data to a buffer, and the native output API is called only when the buffer is full."
i.e. the output is flushed only when it's full, and the input?
 
jatan bhavsar
Ranch Hand
Posts: 299
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michele,

Refer to this link which will solve your doubt.

http://www.coderanch.com/t/518881/java/java/meant-calling-native-API-while
and close ask moderator to close this thread if the ans is satisfactory.

Regards
Jatan
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jatan bhavsar wrote:ask moderator to close this thread if the ans is satisfactory.

Nah. Somebody else might find it useful.

Winston
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!