The libcommons-compress-java renamed the tar classes as follows:

  TarEntry.class -> TarArchiveEntry.class
  TarInputStream.class -> TarArchiveInputStream.class
  TarOutputStream.class -> TarArchiveOutputStream.class

The appended patch (bootchart_renamedtar.patch) for
bootchart-0.10~svn407 and renaming the following files fixed the
reported bug for me:

  mv lib/org/apache/commons/compress/tar/Tar{,Archive}Entry.java
  mv lib/org/apache/commons/compress/tar/Tar{,Archive}InputStream.java
  mv lib/org/apache/commons/compress/tar/Tar{,Archive}OutputStream.java

diff -rup bootchart-0.10~svn407-orig/lib/org/apache/commons/compress/tar/TarEntry.java bootchart-0.10~svn407/lib/org/apache/commons/compress/tar/TarEntry.java
--- bootchart-0.10~svn407-orig/lib/org/apache/commons/compress/tar/TarEntry.java	2007-12-23 01:08:52.000000000 +0100
+++ bootchart-0.10~svn407/lib/org/apache/commons/compress/tar/TarEntry.java	2009-09-24 11:32:49.000000000 +0200
@@ -24,18 +24,18 @@ import java.util.Locale;
  * header, as well as the entry's File. Entries can be instantiated in one of
  * three ways, depending on how they are to be used. <p>
  *
- * TarEntries that are created from the header bytes read from an archive are
- * instantiated with the TarEntry( byte[] ) constructor. These entries will be
+ * TarArchiveEntries that are created from the header bytes read from an archive are
+ * instantiated with the TarArchiveEntry( byte[] ) constructor. These entries will be
  * used when extracting from or listing the contents of an archive. These
  * entries have their header filled in using the header bytes. They also set the
  * File to null, since they reference an archive entry not a file. <p>
  *
- * TarEntries that are created from Files that are to be written into an archive
- * are instantiated with the TarEntry( File ) constructor. These entries have
+ * TarArchiveEntries that are created from Files that are to be written into an archive
+ * are instantiated with the TarArchiveEntry( File ) constructor. These entries have
  * their header filled in using the File's information. They also keep a
  * reference to the File for convenience when writing entries. <p>
  *
- * Finally, TarEntries can be constructed from nothing but a name. This allows
+ * Finally, TarArchiveEntries can be constructed from nothing but a name. This allows
  * the programmer to construct the entry by hand, for instance when only an
  * InputStream is available for writing to the archive, and the header
  * information is constructed from other information. In this case the header
@@ -64,10 +64,10 @@ import java.util.Locale;
  * @author <a href="mailto:stef...@apache.org">Stefano Mazzocchi</a>
  * @author <a href="mailto:pe...@apache.org">Peter Donald</a>
  * @version $Revision$ $Date$
- * @see TarInputStream
- * @see TarOutputStream
+ * @see TarArchiveInputStream
+ * @see TarArchiveOutputStream
  */
-public class TarEntry
+public class TarArchiveEntry
 {
     /**
      * The length of the name field in a header buffer.
@@ -152,7 +152,7 @@ public class TarEntry
      *
      * @param name the name of the entry
      */
-    public TarEntry( final String name )
+    public TarArchiveEntry( final String name )
     {
         this();
 
@@ -173,7 +173,7 @@ public class TarEntry
      * @param name Description of Parameter
      * @param linkFlag Description of Parameter
      */
-    public TarEntry( final String name, final byte linkFlag )
+    public TarArchiveEntry( final String name, final byte linkFlag )
     {
         this( name );
         m_linkFlag = linkFlag;
@@ -185,7 +185,7 @@ public class TarEntry
      *
      * @param file The file that the entry represents.
      */
-    public TarEntry( final File file )
+    public TarArchiveEntry( final File file )
     {
         this();
 
@@ -261,7 +261,7 @@ public class TarEntry
      *
      * @param header The header bytes from a tar archive entry.
      */
-    public TarEntry( final byte[] header )
+    public TarArchiveEntry( final byte[] header )
     {
         this();
         parseTarHeader( header );
@@ -270,7 +270,7 @@ public class TarEntry
     /**
      * Construct an empty entry and prepares the header values.
      */
-    private TarEntry()
+    private TarArchiveEntry()
     {
         m_magic = new StringBuffer( TarConstants.TMAGIC );
         m_name = new StringBuffer();
@@ -403,23 +403,23 @@ public class TarEntry
 
     /**
      * If this entry represents a file, and the file is a directory, return an
-     * array of TarEntries for this entry's children.
+     * array of TarArchiveEntries for this entry's children.
      *
-     * @return An array of TarEntry's for this entry's children.
+     * @return An array of TarArchiveEntry's for this entry's children.
      */
-    public TarEntry[] getDirectoryEntries()
+    public TarArchiveEntry[] getDirectoryEntries()
     {
         if( null == m_file || !m_file.isDirectory() )
         {
-            return new TarEntry[ 0 ];
+            return new TarArchiveEntry[ 0 ];
         }
 
         final String[] list = m_file.list();
-        final TarEntry[] result = new TarEntry[ list.length ];
+        final TarArchiveEntry[] result = new TarArchiveEntry[ list.length ];
 
         for( int i = 0; i < list.length; ++i )
         {
-            result[ i ] = new TarEntry( new File( m_file, list[ i ] ) );
+            result[ i ] = new TarArchiveEntry( new File( m_file, list[ i ] ) );
         }
 
         return result;
@@ -557,7 +557,7 @@ public class TarEntry
      * @param desc Entry to be checked as a descendent of
      * @return True if entry is a descendant of
      */
-    public boolean isDescendent( final TarEntry desc )
+    public boolean isDescendent( final TarArchiveEntry desc )
     {
         return desc.getName().startsWith( getName() );
     }
@@ -605,7 +605,7 @@ public class TarEntry
      * @param other Entry to be checked for equality.
      * @return True if the entries are equal.
      */
-    public boolean equals( final TarEntry other )
+    public boolean equals( final TarArchiveEntry other )
     {
         return getName().equals( other.getName() );
     }
diff -rup bootchart-0.10~svn407-orig/lib/org/apache/commons/compress/tar/TarInputStream.java bootchart-0.10~svn407/lib/org/apache/commons/compress/tar/TarInputStream.java
--- bootchart-0.10~svn407-orig/lib/org/apache/commons/compress/tar/TarInputStream.java	2007-12-23 01:08:52.000000000 +0100
+++ bootchart-0.10~svn407/lib/org/apache/commons/compress/tar/TarInputStream.java	2009-09-24 11:33:26.000000000 +0200
@@ -21,7 +21,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 /**
- * The TarInputStream reads a UNIX tar archive as an InputStream. methods are
+ * The TarArchiveInputStream reads a UNIX tar archive as an InputStream. methods are
  * provided to position at each successive entry in the archive, and the read
  * each entry as a normal input stream using read().
  *
@@ -29,14 +29,14 @@ import java.io.OutputStream;
  * @author <a href="mailto:stef...@apache.org">Stefano Mazzocchi</a>
  * @author <a href="mailto:pe...@apache.org">Peter Donald</a>
  * @version $Revision$ $Date$
- * @see TarInputStream
- * @see TarEntry
+ * @see TarArchiveInputStream
+ * @see TarArchiveEntry
  */
-public class TarInputStream
+public class TarArchiveInputStream
     extends FilterInputStream
 {
     private TarBuffer m_buffer;
-    private TarEntry m_currEntry;
+    private TarArchiveEntry m_currEntry;
     private boolean m_debug;
     private int m_entryOffset;
     private int m_entrySize;
@@ -45,41 +45,41 @@ public class TarInputStream
     private byte[] m_readBuf;
 
     /**
-     * Construct a TarInputStream using specified input
+     * Construct a TarArchiveInputStream using specified input
      * stream and default block and record sizes.
      *
-     * @param input stream to create TarInputStream from
+     * @param input stream to create TarArchiveInputStream from
      * @see TarBuffer#DEFAULT_BLOCKSIZE
      * @see TarBuffer#DEFAULT_RECORDSIZE
      */
-    public TarInputStream( final InputStream input )
+    public TarArchiveInputStream( final InputStream input )
     {
         this( input, TarBuffer.DEFAULT_BLOCKSIZE, TarBuffer.DEFAULT_RECORDSIZE );
     }
 
     /**
-     * Construct a TarInputStream using specified input
+     * Construct a TarArchiveInputStream using specified input
      * stream, block size and default record sizes.
      *
-     * @param input stream to create TarInputStream from
+     * @param input stream to create TarArchiveInputStream from
      * @param blockSize the block size to use
      * @see TarBuffer#DEFAULT_RECORDSIZE
      */
-    public TarInputStream( final InputStream input,
+    public TarArchiveInputStream( final InputStream input,
                            final int blockSize )
     {
         this( input, blockSize, TarBuffer.DEFAULT_RECORDSIZE );
     }
 
     /**
-     * Construct a TarInputStream using specified input
+     * Construct a TarArchiveInputStream using specified input
      * stream, block size and record sizes.
      *
-     * @param input stream to create TarInputStream from
+     * @param input stream to create TarArchiveInputStream from
      * @param blockSize the block size to use
      * @param recordSize the record size to use
      */
-    public TarInputStream( final InputStream input,
+    public TarArchiveInputStream( final InputStream input,
                            final int blockSize,
                            final int recordSize )
     {
@@ -104,14 +104,14 @@ public class TarInputStream
      * Get the next entry in this tar archive. This will skip over any remaining
      * data in the current entry, if there is one, and place the input stream at
      * the header of the next entry, and read the header and instantiate a new
-     * TarEntry from the header bytes and return that entry. If there are no
+     * TarArchiveEntry from the header bytes and return that entry. If there are no
      * more entries in the archive, null will be returned to indicate that the
      * end of the archive has been reached.
      *
-     * @return The next TarEntry in the archive, or null.
+     * @return The next TarArchiveEntry in the archive, or null.
      * @exception IOException Description of Exception
      */
-    public TarEntry getNextEntry()
+    public TarArchiveEntry getNextEntry()
         throws IOException
     {
         if( m_hasHitEOF )
@@ -125,7 +125,7 @@ public class TarInputStream
 
             if( m_debug )
             {
-                final String message = "TarInputStream: SKIP currENTRY '" +
+                final String message = "TarArchiveInputStream: SKIP currENTRY '" +
                     m_currEntry.getName() + "' SZ " + m_entrySize +
                     " OFF " + m_entryOffset + "  skipping " + numToSkip + " bytes";
                 debug( message );
@@ -163,7 +163,7 @@ public class TarInputStream
         }
         else
         {
-            m_currEntry = new TarEntry( headerBuf );
+            m_currEntry = new TarArchiveEntry( headerBuf );
 
             if( !( headerBuf[ 257 ] == 'u' && headerBuf[ 258 ] == 's' &&
                 headerBuf[ 259 ] == 't' && headerBuf[ 260 ] == 'a' &&
@@ -174,7 +174,7 @@ public class TarInputStream
 
             if( m_debug )
             {
-                final String message = "TarInputStream: SET CURRENTRY '" +
+                final String message = "TarArchiveInputStream: SET CURRENTRY '" +
                     m_currEntry.getName() + "' size = " + m_currEntry.getSize();
                 debug( message );
             }
diff -rup bootchart-0.10~svn407-orig/lib/org/apache/commons/compress/tar/TarOutputStream.java bootchart-0.10~svn407/lib/org/apache/commons/compress/tar/TarOutputStream.java
--- bootchart-0.10~svn407-orig/lib/org/apache/commons/compress/tar/TarOutputStream.java	2007-12-23 01:08:52.000000000 +0100
+++ bootchart-0.10~svn407/lib/org/apache/commons/compress/tar/TarOutputStream.java	2009-09-24 11:33:58.000000000 +0200
@@ -21,17 +21,17 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 /**
- * The TarOutputStream writes a UNIX tar archive as an OutputStream. Methods are
+ * The TarArchiveOutputStream writes a UNIX tar archive as an OutputStream. Methods are
  * provided to put entries, and then write their contents by writing to this
  * stream using write().
  *
  * @author Timothy Gerard Endres <a href="mailto:t...@ice.com">t...@ice.com</a>
  * @author <a href="mailto:pe...@apache.org">Peter Donald</a>
  * @version $Revision$ $Date$
- * @see TarInputStream
- * @see TarEntry
+ * @see TarArchiveInputStream
+ * @see TarArchiveEntry
  */
-public class TarOutputStream
+public class TarArchiveOutputStream
     extends FilterOutputStream
 {
     /**
@@ -68,41 +68,41 @@ public class TarOutputStream
     private byte[] m_recordBuf;
 
     /**
-     * Construct a TarOutputStream using specified input
+     * Construct a TarArchiveOutputStream using specified input
      * stream and default block and record sizes.
      *
-     * @param output stream to create TarOutputStream from
+     * @param output stream to create TarArchiveOutputStream from
      * @see TarBuffer#DEFAULT_BLOCKSIZE
      * @see TarBuffer#DEFAULT_RECORDSIZE
      */
-    public TarOutputStream( final OutputStream output )
+    public TarArchiveOutputStream( final OutputStream output )
     {
         this( output, TarBuffer.DEFAULT_BLOCKSIZE, TarBuffer.DEFAULT_RECORDSIZE );
     }
 
     /**
-     * Construct a TarOutputStream using specified input
+     * Construct a TarArchiveOutputStream using specified input
      * stream, block size and default record sizes.
      *
-     * @param output stream to create TarOutputStream from
+     * @param output stream to create TarArchiveOutputStream from
      * @param blockSize the block size
      * @see TarBuffer#DEFAULT_RECORDSIZE
      */
-    public TarOutputStream( final OutputStream output,
+    public TarArchiveOutputStream( final OutputStream output,
                             final int blockSize )
     {
         this( output, blockSize, TarBuffer.DEFAULT_RECORDSIZE );
     }
 
     /**
-     * Construct a TarOutputStream using specified input
+     * Construct a TarArchiveOutputStream using specified input
      * stream, block size and record sizes.
      *
-     * @param output stream to create TarOutputStream from
+     * @param output stream to create TarArchiveOutputStream from
      * @param blockSize the block size
      * @param recordSize the record size
      */
-    public TarOutputStream( final OutputStream output,
+    public TarArchiveOutputStream( final OutputStream output,
                             final int blockSize,
                             final int recordSize )
     {
@@ -220,20 +220,20 @@ public class TarOutputStream
      * <B>MUST</B> be called to ensure that all buffered data is completely
      * written to the output stream.
      *
-     * @param entry The TarEntry to be written to the archive.
+     * @param entry The TarArchiveEntry to be written to the archive.
      * @exception IOException when an IO error causes operation to fail
      */
-    public void putNextEntry( final TarEntry entry )
+    public void putNextEntry( final TarArchiveEntry entry )
         throws IOException
     {
-        if( entry.getName().length() >= TarEntry.NAMELEN )
+        if( entry.getName().length() >= TarArchiveEntry.NAMELEN )
         {
             if( m_longFileMode == LONGFILE_GNU )
             {
-                // create a TarEntry for the LongLink, the contents
+                // create a TarArchiveEntry for the LongLink, the contents
                 // of which are the entry's name
-                final TarEntry longLinkEntry =
-                    new TarEntry( TarConstants.GNU_LONGLINK,
+                final TarArchiveEntry longLinkEntry =
+                    new TarArchiveEntry( TarConstants.GNU_LONGLINK,
                                   TarConstants.LF_GNUTYPE_LONGNAME );
 
                 longLinkEntry.setSize( entry.getName().length() );
@@ -245,7 +245,7 @@ public class TarOutputStream
             else if( m_longFileMode != LONGFILE_TRUNCATE )
             {
                 final String message = "file name '" + entry.getName() +
-                    "' is too long ( > " + TarEntry.NAMELEN + " bytes)";
+                    "' is too long ( > " + TarArchiveEntry.NAMELEN + " bytes)";
                 throw new IOException( message );
             }
         }
diff -rup bootchart-0.10~svn407-orig/src/org/bootchart/Main.java bootchart-0.10~svn407/src/org/bootchart/Main.java
--- bootchart-0.10~svn407-orig/src/org/bootchart/Main.java	2007-12-23 01:08:52.000000000 +0100
+++ bootchart-0.10~svn407/src/org/bootchart/Main.java	2009-09-24 11:36:41.000000000 +0200
@@ -41,8 +41,8 @@ import org.apache.commons.cli.HelpFormat
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
-import org.apache.commons.compress.tar.TarEntry;
-import org.apache.commons.compress.tar.TarInputStream;
+import org.apache.commons.compress.tar.TarArchiveEntry;
+import org.apache.commons.compress.tar.TarArchiveInputStream;
 import org.bootchart.common.BootStats;
 import org.bootchart.common.Common;
 import org.bootchart.common.ProcessTree;
@@ -177,7 +177,7 @@ public class Main {
 		if (!logFile.exists()) {
 			return null;
 		}
-		TarInputStream tis = null;
+		TarArchiveInputStream tis = null;
 		File[] files = null;
 		boolean isLogTarball; // whether it's a tarball or dir
 		if (logFile.isFile()) {
@@ -186,7 +186,7 @@ public class Main {
 			if (logFile.getName().endsWith("gz")) {
 				is = new GZIPInputStream(is);
 			}
-			tis = new TarInputStream(is);
+			tis = new TarArchiveInputStream(is);
 		} else {
 			isLogTarball = false;
 			files = logFile.listFiles();
@@ -210,14 +210,14 @@ public class Main {
 		while (hasMoreFiles) {
 			String logName = null;
 			InputStream is = null;
-			TarEntry tarEntry = null;
+			TarArchiveEntry tarArchiveEntry = null;
 			if (isLogTarball) {
-				tarEntry = tis.getNextEntry();
-				if (tarEntry == null) {
+				tarArchiveEntry = tis.getNextEntry();
+				if (tarArchiveEntry == null) {
 					hasMoreFiles = false;
 					break;
 				}
-				logName = tarEntry.getName();
+				logName = tarArchiveEntry.getName();
 				is = tis;
 			} else {
 				logName = files[fileI].getName();
@@ -270,7 +270,7 @@ public class Main {
 			} else {
 				log.warning("Unknown log file: " + logName);
 				if (logName.length() > 32) {
-					// We're getting garbage from TarInputStream.  Break out since
+					// We're getting garbage from TarArchiveInputStream.  Break out since
 					// a malformed tarball can cause spinning.
 					hasMoreFiles = false;
 					break;
diff -rup bootchart-0.10~svn407-orig/src/org/bootchart/parser/linux/PacctParser.java bootchart-0.10~svn407/src/org/bootchart/parser/linux/PacctParser.java
--- bootchart-0.10~svn407-orig/src/org/bootchart/parser/linux/PacctParser.java	2007-12-23 01:08:52.000000000 +0100
+++ bootchart-0.10~svn407/src/org/bootchart/parser/linux/PacctParser.java	2009-09-24 11:37:09.000000000 +0200
@@ -50,7 +50,7 @@ public class PacctParser {
 	public static Map parseLog(InputStream is) throws IOException {
 		Map forkMap = new HashMap();
 		while (is.available() > 0) {
-			// Note: TarInputStream's skip() seems broken, so read() instead
+			// Note: TarArchiveInputStream's skip() seems broken, so read() instead
 			is.read(); // 
 			byte version = (byte)is.read();
 			if (version < 3) {

Reply via email to