code: public synchronized void setNewWindows(ArrayList<Long> newWindows)
        throws IOException {
      if (newWindows.size() != windows.size()) {
        throw new IOException(
            "Number of new windows need to be the same as that of old ones");
      }
      Collections.sort(newWindows);
      for (int i = 0; i < newWindows.size(); i++) {
        if (newWindows.get(i) > windows.get(i)) {
          throw new IOException ("New window " + newWindows.get(i) +
            " should be smaller than the old one " + windows.get(i)); 
        }
        windows.set(i, newWindows.get(i));
      }
    }
docs: Only for testing