How to download/gunzip a file and obtain an InputStream of the actual file?

StackOverflow https://stackoverflow.com/questions/7502404

  •  24-01-2021
  •  | 
  •  

سؤال

I have a url of a gzipped file. I would like to obtain an InputStream of the actual file in Java. What is the best way to achieve this?

هل كانت مفيدة؟

المحلول

Do you mean, something like GZIPInputStream?

InputStream is = ....
InputStream gis = new GZIPInputStream(is);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top