code: public synchronized int addColumn(SparseArray<? extends Number> column) {
          if (isFinished)
              throw new IllegalStateException(
                  "Cannot add columns to a MatrixBuilder that is finished");
  
          if (column.length() > numRows)
              numRows = column.length();
  
          // SparseArray instances can take on the maximum possible array size
          // when the array length isn't specified.  This ruins the matrix size
          // specification since the matrix shouldn't actually be that big.
          // However, because this is an implementation artifact, we can't check
          // for it explicitly with an exception.  Therefore, put in an assert to
          // indicate what is likely going on if asserts are enabled for debugging
          // they symptoms.
          assert column.length() != Integer.MAX_VALUE : "adding a column whose " +
              "length is Integer.MAX_VALUE (was likley left unspecified in the " +
              " constructor).";           
  
          int[] nonZero = column.getElementIndices();
          nonZeroValues += nonZero.length;
          try {
              matrixDos.writeInt(nonZero.length);
              for (int i : nonZero) {
                  matrixDos.writeInt(i); // write the row index
                  matrixDos.writeFloat(column.get(i).floatValue());
              }
          } catch (IOException ioe) {
              throw new IOError(ioe);
          }
          return ++curCol;
      }
docs: {@inheritDoc}