public static Properties rewriteProperties(
      Properties customOperatorProcessors, String defaultOperatorProcessorClassName) {

    if (customOperatorProcessors == null) {
      throw new NullPointerException(
          "Custom operator processors cannot be specified by a null Properties instance.");
    }
    Properties properties = new Properties();
    for (Iterator iter = PdfUtil.getPdfOperators(); iter.hasNext(); ) {
      String key = (String) iter.next();
      properties.setProperty(
          key, customOperatorProcessors.getProperty(key, defaultOperatorProcessorClassName));
    }
    return properties;
  }