Sharing ByteBuffer for Reading and Writing

Discussion in 'Java' started by -, Jul 5, 2005.

  1. -

    - Guest

    Is it the norm to use one ByteBuffer for both reading and writing or to
    have separate ones for each?
     
    -, Jul 5, 2005
    #1
    1. Advertising

  2. 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"
     
    Stefan Schulz, Jul 5, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Silvis
    Replies:
    1
    Views:
    815
    Paul Lutus
    Sep 16, 2004
  2. Jesper Sahner

    ByteBuffer and arrays

    Jesper Sahner, Nov 29, 2004, in forum: Java
    Replies:
    4
    Views:
    873
    Jesper Sahner
    Dec 1, 2004
  3. jespersahner

    Bytebuffer and UTF

    jespersahner, Aug 3, 2005, in forum: Java
    Replies:
    4
    Views:
    997
    Roedy Green
    Aug 16, 2005
  4. Replies:
    2
    Views:
    1,498
  5. Replies:
    4
    Views:
    645
    Nigel Wade
    Mar 12, 2008
Loading...

Share This Page