Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Sharing ByteBuffer for Reading and Writing

Reply
Thread Tools

Sharing ByteBuffer for Reading and Writing

 
 
-
Guest
Posts: n/a
 
      07-05-2005
Is it the norm to use one ByteBuffer for both reading and writing or to
have separate ones for each?
 
Reply With Quote
 
 
 
 
Stefan Schulz
Guest
Posts: n/a
 
      07-05-2005
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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reading bytes from bytebuffer? nooneinparticular314159@yahoo.com Java 4 03-12-2008 09:38 AM
Get Array From ByteBuffer (If ByteBuffer doesn't have an array backing it) res7cxbi@verizon.net Java 2 01-01-2006 08:58 PM
Bytebuffer and UTF jespersahner Java 4 08-16-2005 04:16 AM
ByteBuffer and arrays Jesper Sahner Java 4 12-01-2004 03:12 PM
Problem reading from nio socketchannels into a bytebuffer Jeff Silvis Java 1 09-16-2004 03:48 PM



Advertisments