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 * </pre> @@ -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() {