Code example for ZipFile

Methods: getEntry, getInputStream

0
    InputStream stream = kmzFile.getInputStream(kmlEntry);
    return new InputStreamReader(stream);
  } 
 
  public InputStream getImageStream(String path) throws IOException {
    ZipEntry zipEntry = kmzFile.getEntry(path);
    if (zipEntry == null) {
      throw new FileNotFoundException("Image not found in kmz file");
    } 
    return kmzFile.getInputStream(zipEntry);
  } 
 
  public int getImageOrientation(String path) {
    // Read image orientation from kmz file if available 
    ZipEntry entry = kmzFile.getEntry(MAP_ORIENTATION_PROPERTIES);
    if (entry == null) {
      // No properties file present, return no rotation 
      return 0; 
    } 
    InputStream in = null;
    try {