code: public void merge(final ByteRange range) {
  	// always use copies of objects
  	ByteRange newRange = new ByteRange(range);
  	logger.debug( this.toFtpCmdArgument() + " + " + newRange.toString());
  	int oldSize = vector.size();
  	int index = 0;
  	final int NOT_YET = -1;
  	int merged = NOT_YET;
  
  	if (oldSize == 0) {
  	    vector.add(newRange);
  	    return;
  	}
  
  	for (int i = 0; i < oldSize; i++) {
  
  	    int result = newRange.merge((ByteRange)vector.elementAt(index));
  
  	    switch (result) {
  	    case ByteRange.THIS_ABOVE :
  		//last_below = index;
  		index ++;
  		break;
  	    case ByteRange.ADJACENT :
  	    case ByteRange.THIS_SUBSET :
  	    case ByteRange.THIS_SUPERSET :
  		if (merged == NOT_YET) {
  		    vector.remove(index);
  		    vector.add(index, newRange);
  		    merged = index;
  		    index++;
  		} else {
  		    vector.remove(index);
  		    //do not augment index
  		}
  		break;
  	    case ByteRange.THIS_BELOW :
  		if (merged == NOT_YET) {
  		    vector.add(index, newRange);
  		}
  		return;
  	    }
  	}
  
  	if (merged == NOT_YET) {
  	    vector.add(newRange);
  	}
      }
docs: Merge a copy of the given ByteRange into this list.
  The resulting range list will represent
  all the integers represented so far, plus the integers represented
  by the new range.
  The resulting list will be stored in this object,
  while the parameter object will remain intact.
  For instance:
  <ul>
  <li>merge("10-15 30-35", "20-25") -&lt;  "10-15 20-25 30-35"
  <li>merge("10-15 30-35", "12-15") -&lt;  "10-15 20-25"
  <li>merge("10-15 30-35", "16-40") -&lt;  "10-40"
  </ul>