code: protected boolean write(ByteBuffer buffer) throws IOException{
          while(buffer.hasRemaining()){
              if(out.write(buffer)==0){
                  out.addWriteInterest();
                  return false;
              }
          }
          return true;
      }
docs: /*-------------------------------------------------[ writeBuffer ]---------------------------------------------------