Пример #1
0
  private void writeConstructionImages(Construction cons, ZipOutputStream zip, String filePath)
      throws IOException {
    // <-- Modified for Intergeo File Format (Yves Kreis)
    // save all GeoImage images
    // TreeSet images = cons.getGeoSetLabelOrder(GeoElement.GEO_CLASS_IMAGE);
    TreeSet geos = cons.getGeoSetLabelOrder();
    if (geos == null) return;

    Iterator<GeoElement> it = geos.iterator();
    while (it.hasNext()) {
      GeoElement geo = it.next();
      // Michael Borcherds 2007-12-10 this line put back (not needed now
      // MD5 code put in the correct place!)
      String fileName = geo.getImageFileName();
      if (fileName != null) {
        BufferedImage img = geo.getFillImage();
        if (img != null) writeImageToZip(zip, filePath + fileName, img);
      }
    }
  }