View Javadoc
1   package org.codehaus.plexus.archiver.tar;
2   
3   import java.io.File;
4   import java.io.IOException;
5   import java.io.InputStream;
6   import java.util.zip.GZIPInputStream;
7   
8   import org.codehaus.plexus.archiver.util.Streams;
9   
10  /**
11   * Extension of {@link TarFile} for gzip compressed files.
12   */
13  public class GZipTarFile extends TarFile {
14  
15      /**
16       * Creates a new instance with the given file.
17       */
18      public GZipTarFile(File file) {
19          super(file);
20      }
21  
22      @Override
23      protected InputStream getInputStream(File file) throws IOException {
24          return Streams.bufferedInputStream(new GZIPInputStream(super.getInputStream(file)));
25      }
26  }