Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Sharing ByteBuffer for Reading and Writing (http://www.velocityreviews.com/forums/t144631-sharing-bytebuffer-for-reading-and-writing.html)

- 07-05-2005 04:05 AM

Sharing ByteBuffer for Reading and Writing
 
Is it the norm to use one ByteBuffer for both reading and writing or to
have separate ones for each?

Stefan Schulz 07-05-2005 06:31 AM

Re: Sharing ByteBuffer for Reading and Writing
 
On Tue, 05 Jul 2005 12:05:25 +0800, - wrote:

> Is it the norm to use one ByteBuffer for both reading and writing or to
> have separate ones for each?


Well, i would use it for both reading and writing, if this makes sense. If
i had to jump through many additional hops, allocating another buffer is
preferable to horribly contrived code to share one buffer.

--
You can't run away forever,
But there's nothing wrong with getting a good head start.
--- Jim Steinman, "Rock and Roll Dreams Come Through"




All times are GMT. The time now is 08:38 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57