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   import org.codehaus.plexus.archiver.util.Streams;
8   
9   /**
10   * Extension of {@link TarFile} for gzip compressed files.
11   */
12  public class GZipTarFile
13      extends TarFile
14  {
15  
16      /**
17       * Creates a new instance with the given file.
18       */
19      public GZipTarFile( File file )
20      {
21          super( file );
22      }
23  
24      @Override
25      protected InputStream getInputStream( File file )
26          throws IOException
27      {
28          return Streams.bufferedInputStream( new GZIPInputStream( super.getInputStream( file ) ) );
29      }
30  
31  }