Strabon

changeset 143:9331be0ac3c3

Trying on Strabon KMZ.. more
author Michael Sioutis
date Wed May 09 17:28:13 2012 +0300 (2012-05-09)
parents 36df5f584371
children 450e41a1a7ce
files runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java
line diff
     1.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Wed May 09 16:07:36 2012 +0300
     1.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Wed May 09 17:28:13 2012 +0300
     1.3 @@ -640,17 +640,22 @@
     1.4  				else //KMZ
     1.5  				{
     1.6  					//compress
     1.7 -//					FileOutputStream fos = new FileOutputStream(new File("deleteme.kmz"));
     1.8 -					//ZipOutputStream kmzout = new ZipOutputStream(retStream);
     1.9 -//					ZipOutputStream kmzout = new ZipOutputStream(fos);
    1.10 -					//ZipEntry entry = new ZipEntry("doc.kml");
    1.11 +					//File zfile = new File("/tmp/deleteme.kmz");
    1.12 +					//retStream.reset();
    1.13 +					//FileOutputStream fos = new FileOutputStream(zfile);
    1.14 +					ZipOutputStream kmzout = new ZipOutputStream(retStream);
    1.15 +					//ZipOutputStream kmzout = new ZipOutputStream(fos);
    1.16 +					ZipEntry entry = new ZipEntry("doc.kml");
    1.17  
    1.18  					//kmzout.setLevel(6);
    1.19 -					//kmzout.putNextEntry(entry);
    1.20 -					//kmzout.write(newString.getBytes());
    1.21 -					//kmzout.closeEntry();
    1.22 -					//kmzout.close();
    1.23 +					kmzout.putNextEntry(entry);
    1.24 +					kmzout.write(newString.getBytes());
    1.25 +				    kmzout.closeEntry();
    1.26 +					kmzout.close();
    1.27  					
    1.28 +					//String kmzString = FileUtils.readFileToString(zfile);
    1.29 +		            //writeOut.write(kmzString);
    1.30 +					/*
    1.31  					try {
    1.32  						File file = new File("/tmp/tmp.kml");
    1.33  						String filename = "/tmp/tmp.kml";
    1.34 @@ -688,7 +693,7 @@
    1.35  			        } catch (Exception e) {
    1.36  			            e.printStackTrace();
    1.37  			        }
    1.38 -										
    1.39 +						*/				
    1.40  				}
    1.41  
    1.42  			} catch (IOException e) {