There is a url by which the * .gz archive comes. When I unzip it, I get an * .zip archive. I need to get this .gz archive without saving it on the device, then pull out the .zip, unzip it and save it to a folder on the device.
ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream is = null; try { is = url.openStream(); byte[] byteChunk = new byte[4096]; int n; while ((n = is.read(byteChunk)) > 0) { baos.write(byteChunk, 0, n); } GZIPOutputStream gzipOutputStream = new GZIPOutputStream(baos); ZipOutputStream zipOutputStream = new ZipOutputStream(gzipOutputStream); } catch (IOException e) { e.printStackTrace(); } It seems to be nonsense and I do not understand something about working with i / o streams. Please explain)