private static void unpack(InputStream is,File srtPath,String languageCode) throws IOException, FatalParsingException {
  String filename;
  ZipInputStream zis=new ZipInputStream(new BufferedInputStream(is));
  ZipEntry ze;
  while ((ze=zis.getNextEntry()) != null) {
    filename=ze.getName();
    if (filename.contains("_MACOSX"))     continue;
    if (isSubFormat(filename)) {
      parseFormatAndSave(filename,srtPath,languageCode,zis);
      try {
        zis.closeEntry();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
      return;
    }
  }
  zis.close();
}

private static void unpack ( InputStream is , File srtPath , String languageCode ) throws IOException , FatalParsingException { String filename ; ZipInputStream zis = new ZipInputStream ( new BufferedInputStream ( is ) ) ; ZipEntry ze ; while ( ( ze = zis . getNextEntry ( ) ) != null ) { filename = ze . getName ( ) ; if ( filename . contains ( "_MACOSX" ) ) continue ; if ( isSubFormat ( filename ) ) { parseFormatAndSave ( filename , srtPath , languageCode , zis ) ; try { zis . closeEntry ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return ; } } zis . close ( ) ; }
unpack zip and save srt
