Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 16158 invoked from network); 1 Aug 2009 14:53:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Aug 2009 14:53:52 -0000 Received: (qmail 40214 invoked by uid 500); 1 Aug 2009 14:53:56 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 40119 invoked by uid 500); 1 Aug 2009 14:53:55 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 40110 invoked by uid 99); 1 Aug 2009 14:53:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Aug 2009 14:53:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Aug 2009 14:53:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7DDF823888DD; Sat, 1 Aug 2009 14:53:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r799880 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/ main/java/org/apache/commons/compress/archivers/ar/ main/java/org/apache/commons/compress/archivers/cpio/ test/java/org/apache/commons/compres... Date: Sat, 01 Aug 2009 14:53:33 -0000 To: commits@commons.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090801145333.7DDF823888DD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Sat Aug 1 14:53:32 2009 New Revision: 799880 URL: http://svn.apache.org/viewvc?rev=799880&view=rev Log: whitespace Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveEntry.java Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java?rev=799880&r1=799879&r2=799880&view=diff ============================================================================== --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java Sat Aug 1 14:53:32 2009 @@ -26,16 +26,16 @@ public interface ArchiveEntry { /** The name of the entry in the archive. May refer to a file or directory or other item */ - public String getName(); - - /** The (uncompressed) size of the entry. May be -1 (SIZE_UNKNOWN) if the size is unknown */ - public long getSize(); - - /** Special value indicating that the size is unknown */ - public static final long SIZE_UNKNOWN = -1; - - /** True if the entry refers to a directory */ - public boolean isDirectory(); + public String getName(); + + /** The (uncompressed) size of the entry. May be -1 (SIZE_UNKNOWN) if the size is unknown */ + public long getSize(); + + /** Special value indicating that the size is unknown */ + public static final long SIZE_UNKNOWN = -1; + + /** True if the entry refers to a directory */ + public boolean isDirectory(); /** The last modified date of the entry */ public Date getLastModifiedDate(); Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java?rev=799880&r1=799879&r2=799880&view=diff ============================================================================== --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java Sat Aug 1 14:53:32 2009 @@ -56,74 +56,74 @@ /** The trailer for each entry */ public static final String TRAILER = "`\012"; - + /** * SVR4/GNU adds a trailing / to names; BSD does not. * They also vary in how names longer than 16 characters are represented. * (Not yet supported by this implementation) */ private final String name; - private final int userId; - private final int groupId; - private final int mode; + private final int userId; + private final int groupId; + private final int mode; private static final int DEFAULT_MODE = 33188; // = (octal) 0100644 - private final long lastModified; - private final long length; + private final long lastModified; + private final long length; - public ArArchiveEntry(String name, long length) { - this(name, length, 0, 0, DEFAULT_MODE, System.currentTimeMillis()); - } - - public ArArchiveEntry(String name, long length, int userId, int groupId, int mode, long lastModified) { - this.name = name; - this.length = length; - this.userId = userId; - this.groupId = groupId; - this.mode = mode; - this.lastModified = lastModified; - } + public ArArchiveEntry(String name, long length) { + this(name, length, 0, 0, DEFAULT_MODE, System.currentTimeMillis()); + } - public ArArchiveEntry(File inputFile, String entryName) { - // TODO sort out mode + public ArArchiveEntry(String name, long length, int userId, int groupId, int mode, long lastModified) { + this.name = name; + this.length = length; + this.userId = userId; + this.groupId = groupId; + this.mode = mode; + this.lastModified = lastModified; + } + + public ArArchiveEntry(File inputFile, String entryName) { + // TODO sort out mode this(entryName, inputFile.isFile() ? inputFile.length() : 0, 0, 0, 0, inputFile.lastModified()); } public long getSize() { - return this.getLength(); - } - - public String getName() { - return name; - } - - public int getUserId() { - return userId; - } - - public int getGroupId() { - return groupId; - } - - public int getMode() { - return mode; - } - - public long getLastModified() { - return lastModified; - } - + return this.getLength(); + } + + public String getName() { + return name; + } + + public int getUserId() { + return userId; + } + + public int getGroupId() { + return groupId; + } + + public int getMode() { + return mode; + } + + public long getLastModified() { + return lastModified; + } + /** {@inheritDocs} */ public Date getLastModifiedDate() { return new Date(1000 * getLastModified()); } - public long getLength() { - return length; - } - - public boolean isDirectory() { - return false; - } + public long getLength() { + return length; + } + + public boolean isDirectory() { + return false; + } /* (non-Javadoc) * @see java.lang.Object#hashCode() Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java?rev=799880&r1=799879&r2=799880&view=diff ============================================================================== --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java Sat Aug 1 14:53:32 2009 @@ -82,7 +82,7 @@ * c_filesize[2] Length of the file in bytes. This is the length of the data * section that follows the header structure. Must be 0 for * FIFOs and directories - * + * * All fields are unsigned short fields with 16-bit integer values * apart from c_mtime and c_filesize which are 32-bit integer values * @@ -146,7 +146,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { // Header description fields - should be same throughout an archive - + /** * See {@link CpioArchiveEntry#setFormat(short)} for possible values. */ @@ -159,7 +159,7 @@ private final int alignmentBoundary; // Header fields - + private long chksum = 0; /** Number of bytes in the file */ @@ -636,7 +636,7 @@ public void setSize(final long size) { if (size < 0 || size > 0xFFFFFFFFL) { throw new IllegalArgumentException("invalid entry size <" + size - + ">"); + + ">"); } this.filesize = size; } @@ -681,9 +681,9 @@ break; default: throw new IllegalArgumentException( - "Unknown mode. " - + "Full: " + Long.toHexString(mode) - + " Masked: " + Long.toHexString(maskedMode)); + "Unknown mode. " + + "Full: " + Long.toHexString(mode) + + " Masked: " + Long.toHexString(maskedMode)); } this.mode = mode; Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveEntry.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveEntry.java?rev=799880&r1=799879&r2=799880&view=diff ============================================================================== --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveEntry.java (original) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveEntry.java Sat Aug 1 14:53:32 2009 @@ -23,25 +23,25 @@ public final class MemoryArchiveEntry implements ArchiveEntry { - private final String name; - - public MemoryArchiveEntry( final String pName ) { - name = pName; - } - - public String getName() { - return name; - } - - public long getSize() { - // TODO Auto-generated method stub - return 0; - } - - public boolean isDirectory() { - // TODO Auto-generated method stub - return false; - } + private final String name; + + public MemoryArchiveEntry(final String pName) { + name = pName; + } + + public String getName() { + return name; + } + + public long getSize() { + // TODO Auto-generated method stub + return 0; + } + + public boolean isDirectory() { + // TODO Auto-generated method stub + return false; + } /** {@inheritDocs} */ public Date getLastModifiedDate() {