This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

buffer size  RSS feed

 
Robert Kennedy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am recalibrating legacy code. I encountered an (Internet) file transfer over a socket which reads/writes 102400 at a time.
Is it wise to match the size of byte to the actual file size or even to smaller bits or is this ok.


private int maxBufferSize = 102400;
private byte[] buffer = new byte[maxBufferSize];

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