private static List < String > readUsingZipInputStream ( final InputStream inputStream ) throws IOException { final BufferedInputStream bis = new BufferedInputStream ( inputStream ) ; final ZipInputStream is = new ZipInputStream ( bis ) ; final List < String > list = new ArrayList <> ( ) ; try { ZipEntry entry ; while ( ( entry = is . getNextEntry ( ) ) != null ) { if ( entry . getName ( ) . startsWith ( "API_SWE_" ) ) { list . addAll ( readCsvContent ( is ) ) ; } } } finally { is . close ( ) ; } return list ; }
Read using zip input stream .