/* GpxKMLWriter automatically uses UTF-8 encoding */
zippo.putNextEntry(new ZipEntry("photo.kml"));
BufferedOutputStream bos = new BufferedOutputStream(zippo);
GpxKMLWriter kw = new GpxKMLWriter(bos, "GPSDings Pictures", false);
kw.writeGpx(gpx);
kw.endDocument();
bos.flush();
zippo.closeEntry();
zippo.close();
} catch (SAXException ex) {
throw new IOException("SAXException: " + ex.getMessage());