private void outputFullLines() throws IOException {
  for (; ; ) {
    int leftLen=leftBuf.indexOf("\n");
    if (leftLen < 0) {
      return;
    }
    int rightLen=rightBuf.indexOf("\n");
    if (rightLen < 0) {
      return;
    }
    if (leftLen != 0) {
      out.write(leftBuf.substring(0,leftLen));
    }
    if (rightLen != 0) {
      writeSpaces(out,leftWidth - leftLen);
      out.write(rightBuf.substring(0,rightLen));
    }
    out.write('\n');
    leftBuf.delete(0,leftLen + 1);
    rightBuf.delete(0,rightLen + 1);
  }
}

private void outputFullLines ( ) throws IOException { for ( ; ; ) { int leftLen = leftBuf . indexOf ( "\n" ) ; if ( leftLen < 0 ) { return ; } int rightLen = rightBuf . indexOf ( "\n" ) ; if ( rightLen < 0 ) { return ; } if ( leftLen != 0 ) { out . write ( leftBuf . substring ( 0 , leftLen ) ) ; } if ( rightLen != 0 ) { writeSpaces ( out , leftWidth - leftLen ) ; out . write ( rightBuf . substring ( 0 , rightLen ) ) ; } out . write ( '\n' ) ; leftBuf . delete ( 0 , leftLen + 1 ) ; rightBuf . delete ( 0 , rightLen + 1 ) ; } }
outputs to the final destination as many full line pairs as there are in the pending output , removing those lines from their respective buffers . this method terminates when at least one of the two column buffers is empty .
