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 05:16 AM.

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