wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes dataOutputStream.write Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "dataOutputStream.write" Watch "dataOutputStream.write" New topic


Robert Kennedy
Ranch Hand

Joined: Jun 27, 2008
Posts: 63
I am writing on a socket.

If the bytes in buffer and less than the bufferSize is additional overhead incurred?

dataOutputStream.write(buffer, 0, bufferSize);
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 690
Could you reenter your question? It doesn't make sense as worded.

write will output buffersize bytes in buffer starting at the first (0) byte.
buffersize must be <= the buffer length
Consider Paul's rocket mass heater.
subject: dataOutputStream.write