Why didn't Sun put common methods found in DatagramChannel and SocketChannelhigher up the hierachy?

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

  1. -

    - Guest

    I noticed that most of the abstract methods in DatagramChannel and
    SocketChannel are the same. Why didn't Sun put those methods higher up
    by creating a class that extends AbstractSelectableChannel?
     
    -, Jul 24, 2005
    #1
    1. Advertising

  2. Re: Why didn't Sun put common methods found in DatagramChannel and SocketChannel higher up the hierachy?

    On Sun, 24 Jul 2005 18:20:19 +0800, - wrote:

    > I noticed that most of the abstract methods in DatagramChannel and
    > SocketChannel are the same. Why didn't Sun put those methods higher up
    > by creating a class that extends AbstractSelectableChannel?


    Ask whoever did the NIO design. It alternates between absolutely divine
    concepts and absolutely abysmal ones. (Buffers, anyone?)

    --
    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 24, 2005
    #2
    1. Advertising

  3. -

    Harald Guest

    Re: Why didn't Sun put common methods found in DatagramChannel andSocketChannel higher up the hierachy?

    Stefan Schulz <> writes:

    > On Sun, 24 Jul 2005 18:20:19 +0800, - wrote:
    > Ask whoever did the NIO design. It alternates between absolutely divine
    > concepts and absolutely abysmal ones. (Buffers, anyone?)


    You mean Buffers instanceof Abysmal? I completely agree. To flip() or
    not to flip() is always the question. What would be wrong with a
    straight forward circular buffer design is a mystery to me.

    Harald.

    --
    ---------------------+---------------------------------------------
    Harald Kirsch (@home)|
    Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software
     
    Harald, Jul 24, 2005
    #3
    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. Andrew Ng
    Replies:
    1
    Views:
    360
    Gerbrand van Dieijen
    Oct 12, 2003
  2. Timo Nentwig

    [newbie] DatagramChannel

    Timo Nentwig, Dec 17, 2003, in forum: Java
    Replies:
    1
    Views:
    1,609
    Timo Nentwig
    Dec 18, 2003
  3. Replies:
    0
    Views:
    2,909
  4. Nafai
    Replies:
    6
    Views:
    319
    Nafai
    Oct 26, 2004
  5. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,129
    Smokey Grindel
    Dec 2, 2006
Loading...

Share This Page