commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r935616 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
Date Mon, 19 Apr 2010 15:19:51 GMT
Author: bodewig
Date: Mon Apr 19 15:19:51 2010
New Revision: 935616

URL: http://svn.apache.org/viewvc?rev=935616&view=rev
Log:
whitespace

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java?rev=935616&r1=935615&r2=935616&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
Mon Apr 19 15:19:51 2010
@@ -61,10 +61,10 @@ public class ZipArchiveOutputStream exte
     private static final int SHORT = 2;
     private static final int WORD = 4;
     static final int BUFFER_SIZE = 512;
-    
+
     /** indicates if this archive is finished. protected for use in Jar implementation */
     protected boolean finished = false;
-    
+
     /* 
      * Apparently Deflater.setInput gets slowed down a lot on Sun JVMs
      * when it gets handed a really big buffer.  See
@@ -340,11 +340,11 @@ public class ZipArchiveOutputStream exte
         if (finished) {
             throw new IOException("This archive has already been finished");
         }
-        
-        if(entry != null) {
+
+        if (entry != null) {
             throw new IOException("This archives contains unclosed entries.");
         }
-        
+
         cdOffset = written;
         for (Iterator i = entries.iterator(); i.hasNext(); ) {
             writeCentralFileHeader((ZipArchiveEntry) i.next());
@@ -361,10 +361,10 @@ public class ZipArchiveOutputStream exte
      * @throws IOException on error
      */
     public void closeArchiveEntry() throws IOException {
-        if(finished) {
+        if (finished) {
             throw new IOException("Stream has already been finished");
         }
-        
+
         if (entry == null) {
             throw new IOException("No current entry to close");
         }
@@ -428,10 +428,10 @@ public class ZipArchiveOutputStream exte
     /** {@inheritDoc} */
  // @throws ClassCastException if entry is not an instance of ZipArchiveEntry
     public void putArchiveEntry(ArchiveEntry archiveEntry) throws IOException {
-        if(finished) {
+        if (finished) {
             throw new IOException("Stream has already been finished");
         }
-        
+
         if (entry != null) {
             closeArchiveEntry();
         }
@@ -563,10 +563,10 @@ public class ZipArchiveOutputStream exte
      * @exception  IOException  if an I/O error occurs.
      */
     public void close() throws IOException {
-        if(!finished) {
+        if (!finished) {
             finish();
         }
-        
+
         if (raf != null) {
             raf.close();
         }
@@ -626,16 +626,16 @@ public class ZipArchiveOutputStream exte
     protected void writeLocalFileHeader(ZipArchiveEntry ze) throws IOException {
 
         boolean encodable = zipEncoding.canEncode(ze.getName());
-        
+
         final ZipEncoding entryEncoding;
-        
+
         if (!encodable && fallbackToUTF8) {
             entryEncoding = ZipEncodingHelper.UTF8_ZIP_ENCODING;
         } else {
             entryEncoding = zipEncoding;
         }
-        
-        ByteBuffer name = entryEncoding.encode(ze.getName());        
+
+        ByteBuffer name = entryEncoding.encode(ze.getName());
 
         if (createUnicodeExtraFields != UnicodeExtraFieldPolicy.NEVER) {
 
@@ -781,14 +781,14 @@ public class ZipArchiveOutputStream exte
 
         // file name length
         final ZipEncoding entryEncoding;
-        
+
         if (!encodable && fallbackToUTF8) {
             entryEncoding = ZipEncodingHelper.UTF8_ZIP_ENCODING;
         } else {
             entryEncoding = zipEncoding;
         }
-        
-        ByteBuffer name = entryEncoding.encode(ze.getName());        
+
+        ByteBuffer name = entryEncoding.encode(ze.getName());
 
         writeOut(ZipShort.getBytes(name.limit()));
         written += SHORT;
@@ -803,9 +803,9 @@ public class ZipArchiveOutputStream exte
         if (comm == null) {
             comm = "";
         }
-        
+
         ByteBuffer commentB = entryEncoding.encode(comm);
-        
+
         writeOut(ZipShort.getBytes(commentB.limit()));
         written += SHORT;
 
@@ -961,7 +961,7 @@ public class ZipArchiveOutputStream exte
      */
     public ArchiveEntry createArchiveEntry(File inputFile, String entryName)
             throws IOException {
-        if(finished) {
+        if (finished) {
             throw new IOException("Stream has already been finished");
         }
         return new ZipArchiveEntry(inputFile, entryName);



Mime
View raw message