evilsoldier
evilsoldier

Reputation: 163

Get Entry from GZIPInputStream using Java

Is there a way to get entry from GZIPInputStream ? For .zip files I am using the following:

ZipInputStream zis = new ZipInputStream((InputStream) inputStream);
ZipEntry entry = zis.getNextEntry();

But i want to exclude the entry inside file with .xml.gz extension. Or is there a way to extract the data inside .xml.gz file as String ?

Upvotes: 4

Views: 1270

Answers (1)

user207421
user207421

Reputation: 311047

GZIP files don't have entries. They have single payloads.

Upvotes: 2

Related Questions