hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject svn commit: r390883 - in /jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io: ChunkedOutputStream.java ContentLengthInputStream.java ContentLengthOutputStream.java IdentityOutputStream.java
Date Sun, 02 Apr 2006 18:39:52 GMT
Author: oglueck
Date: Sun Apr  2 11:39:50 2006
New Revision: 390883

URL: http://svn.apache.org/viewcvs?rev=390883&view=rev
Log:
more TABs

Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedOutputStream.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthInputStream.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthOutputStream.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/IdentityOutputStream.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedOutputStream.java?rev=390883&r1=390882&r2=390883&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedOutputStream.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedOutputStream.java
Sun Apr  2 11:39:50 2006
@@ -123,8 +123,8 @@
      * @since 3.0
      */
     public ChunkedOutputStream(final HttpDataTransmitter out, int bufferSize)
-    		throws IOException {
-    	super();
+            throws IOException {
+        super();
         this.cache = new byte[bufferSize];
         this.out = out;
     }
@@ -136,7 +136,7 @@
      * @throws IOException
      */
     public ChunkedOutputStream(final HttpDataTransmitter datatransmitter) 
-    		throws IOException {
+            throws IOException {
         this(datatransmitter, 2048);
     }
 
@@ -149,9 +149,9 @@
      */
     protected void flushCache() throws IOException {
         if (this.cachePosition > 0) {
-        	this.out.writeLine(Integer.toHexString(this.cachePosition));
-        	this.out.write(this.cache, 0, this.cachePosition);
-        	this.out.writeLine("");
+            this.out.writeLine(Integer.toHexString(this.cachePosition));
+            this.out.write(this.cache, 0, this.cachePosition);
+            this.out.writeLine("");
             this.cachePosition = 0;
         }
     }
@@ -167,17 +167,17 @@
      * @since 3.0
      */
     protected void flushCacheWithAppend(byte bufferToAppend[], int off, int len) throws IOException
{
-    	this.out.writeLine(Integer.toHexString(this.cachePosition + len));
-    	this.out.write(this.cache, 0, this.cachePosition);
-    	this.out.write(bufferToAppend, off, len);
-    	this.out.writeLine("");
+        this.out.writeLine(Integer.toHexString(this.cachePosition + len));
+        this.out.write(this.cache, 0, this.cachePosition);
+        this.out.write(bufferToAppend, off, len);
+        this.out.writeLine("");
         this.cachePosition = 0;
     }
 
     protected void writeClosingChunk() throws IOException {
         // Write the final chunk.
-    	this.out.writeLine("0");
-    	this.out.writeLine("");
+        this.out.writeLine("0");
+        this.out.writeLine("");
     }
 
     // ----------------------------------------------------------- Public Methods

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthInputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthInputStream.java?rev=390883&r1=390882&r2=390883&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthInputStream.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthInputStream.java
Sun Apr  2 11:39:50 2006
@@ -67,7 +67,7 @@
  */
 public class ContentLengthInputStream extends InputStream {
     
-	private static int BUFFER_SIZE = 2048;
+    private static int BUFFER_SIZE = 2048;
     /**
      * The maximum number of bytes that can be read from the stream. Subsequent
      * read operations will return -1.
@@ -196,24 +196,24 @@
      * @see InputStream#skip(long)
      */
     public long skip(long n) throws IOException {
-    	if (n <= 0) {
-    	    return 0;
-    	}
-    	byte[] buffer = new byte[BUFFER_SIZE];
+        if (n <= 0) {
+            return 0;
+        }
+        byte[] buffer = new byte[BUFFER_SIZE];
         // make sure we don't skip more bytes than are 
         // still available
         long remaining = Math.min(n, this.contentLength - this.pos); 
         // skip and keep track of the bytes actually skipped
         long count = 0;
-    	while (remaining > 0) {
-    	    int l = read(buffer, 0, (int)Math.min(BUFFER_SIZE, remaining));
-    	    if (l == -1) {
-    	    	break;
-    	    }
-    	    count += l;
-    	    remaining -= l;
-    	}
-    	this.pos += count;
-    	return count;
+        while (remaining > 0) {
+            int l = read(buffer, 0, (int)Math.min(BUFFER_SIZE, remaining));
+            if (l == -1) {
+                break;
+            }
+            count += l;
+            remaining -= l;
+        }
+        this.pos += count;
+        return count;
     }
 }

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthOutputStream.java?rev=390883&r1=390882&r2=390883&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthOutputStream.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ContentLengthOutputStream.java
Sun Apr  2 11:39:50 2006
@@ -87,10 +87,10 @@
      * @throws IOException If an I/O problem occurs.
      */
     public void close() throws IOException {
-    	if (!this.closed) {
+        if (!this.closed) {
             this.closed = true;
             this.out.flush();
-    	}
+        }
     }
 
     public void flush() throws IOException {

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/IdentityOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/IdentityOutputStream.java?rev=390883&r1=390882&r2=390883&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/IdentityOutputStream.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/IdentityOutputStream.java
Sun Apr  2 11:39:50 2006
@@ -65,10 +65,10 @@
      * @throws IOException If an I/O problem occurs.
      */
     public void close() throws IOException {
-    	if (!this.closed) {
+        if (!this.closed) {
             this.closed = true;
             this.out.flush();
-    	}
+        }
     }
 
     public void flush() throws IOException {



Mime
View raw message