boolean writeData() throws IOException {
  int tosend;
  int sent;
  byte[] block=new byte[kBlockSize];
  do {
    tosend=Math.min(sendStreamSize - totalSent,block.length);
    System.arraycopy(sendData,totalSent,block,0,tosend);
    if (tosend > 0) {
      sent=localSend(block,tosend);
      updateLocalClock();
      if (sent != -1) {
        totalSent+=sent;
      }
 else {
        logger.log(Level.FINE,"Flow Controlled");
      }
    }
 else {
      sent=tosend=0;
    }
  }
 while (sent > 0);
  if (logger.isLoggable(Level.FINER)) {
    logger.log(Level.FINER,"Sent: " + totalSent + " remaining: "+ (sendStreamSize - totalSent));
  }
  return tosend == 0;
}

boolean writeData ( ) throws IOException { int tosend ; int sent ; byte [ ] block = new byte [ kBlockSize ] ; do { tosend = Math . min ( sendStreamSize - totalSent , block . length ) ; System . arraycopy ( sendData , totalSent , block , 0 , tosend ) ; if ( tosend > 0 ) { sent = localSend ( block , tosend ) ; updateLocalClock ( ) ; if ( sent != - 1 ) { totalSent += sent ; } else { logger . log ( Level . FINE , "Flow Controlled" ) ; } } else { sent = tosend = 0 ; } } while ( sent > 0 ) ; if ( logger . isLoggable ( Level . FINER ) ) { logger . log ( Level . FINER , "Sent: " + totalSent + " remaining: " + ( sendStreamSize - totalSent ) ) ; } return tosend == 0 ; }
writes the data until there ' s space available
