Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to the specification, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/GZIPInputStream.html" rel="nofollow"><code>GZIPInputStream</code></a> is a subclass of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/InflaterInputStream.html" rel="nofollow"><code>InflaterInputStream</code></a>. <code>InflaterInputStream</code> has a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/InflaterInputStream.html#inf" rel="nofollow"><code>protected Inflater inf</code></a> field that is the <a href="http://docs.oracle.com/javase/6/docs/api/java/util/zip/Inflater.html" rel="nofollow"><code>Inflater</code></a> used for the decompression work. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Inflater.html#getBytesRead%28%29" rel="nofollow"><code>Inflater.getBytesRead</code></a> should be particularly useful for your purposes.</p> <p>Unfortunately, <code>GZIPInputStream</code> does not expose <code>inf</code>, so probably you'll have to create your own subclass and expose the <code>Inflater</code>, e.g.</p> <pre><code>public final class ExposedGZIPInputStream extends GZIPInputStream { public ExposedGZIPInputStream(final InputStream stream) { super(stream); } public ExposedGZIPInputStream(final InputStream stream, final int n) { super(stream, n); } public Inflater inflater() { return super.inf; } } ... final ExposedGZIPInputStream gzip = new ExposedGZIPInputStream(...); ... final Inflater inflater = gzip.inflater(); final long read = inflater.getBytesRead(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload