commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1063833 - in /commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary: BaseNCodecInputStream.java BaseNCodecOutputStream.java
Date Wed, 26 Jan 2011 19:09:01 GMT
Author: ggregory
Date: Wed Jan 26 19:09:00 2011
New Revision: 1063833

URL: http://svn.apache.org/viewvc?rev=1063833&view=rev
Log:
Renamed basedCodec to baseNCodec.

Modified:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java?rev=1063833&r1=1063832&r2=1063833&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
Wed Jan 26 19:09:00 2011
@@ -26,14 +26,14 @@ public class BaseNCodecInputStream exten
 
     private final boolean doEncode;
 
-    private final BaseNCodec basedCodec;
+    private final BaseNCodec baseNCodec;
 
     private final byte[] singleByte = new byte[1];
 
-    protected BaseNCodecInputStream(InputStream in, BaseNCodec basedCodec, boolean doEncode)
{
+    protected BaseNCodecInputStream(InputStream in, BaseNCodec baseNCodec, boolean doEncode)
{
         super(in);
         this.doEncode = doEncode;
-        this.basedCodec = basedCodec;
+        this.baseNCodec = baseNCodec;
     }
 
     /**
@@ -101,16 +101,16 @@ public class BaseNCodecInputStream exten
              This is a fix for CODEC-101
             */
             while (readLen == 0) {
-                if (!basedCodec.hasData()) {
+                if (!baseNCodec.hasData()) {
                     byte[] buf = new byte[doEncode ? 4096 : 8192];
                     int c = in.read(buf);
                     if (doEncode) {
-                        basedCodec.encode(buf, 0, c);
+                        baseNCodec.encode(buf, 0, c);
                     } else {
-                        basedCodec.decode(buf, 0, c);
+                        baseNCodec.decode(buf, 0, c);
                     }
                 }
-                readLen = basedCodec.readResults(b, offset, len);
+                readLen = baseNCodec.readResults(b, offset, len);
             }
             return readLen;
         }

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java?rev=1063833&r1=1063832&r2=1063833&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java
(original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java
Wed Jan 26 19:09:00 2011
@@ -26,13 +26,13 @@ public class BaseNCodecOutputStream exte
 
     private final boolean doEncode;
 
-    private final BaseNCodec basedCodec;
+    private final BaseNCodec baseNCodec;
 
     private final byte[] singleByte = new byte[1];
 
     public BaseNCodecOutputStream(OutputStream out, BaseNCodec basedCodec, boolean doEncode)
{
         super(out);
-        this.basedCodec = basedCodec;
+        this.baseNCodec = basedCodec;
         this.doEncode = doEncode;
     }
 
@@ -76,9 +76,9 @@ public class BaseNCodecOutputStream exte
             throw new IndexOutOfBoundsException();
         } else if (len > 0) {
             if (doEncode) {
-                basedCodec.encode(b, offset, len);
+                baseNCodec.encode(b, offset, len);
             } else {
-                basedCodec.decode(b, offset, len);
+                baseNCodec.decode(b, offset, len);
             }
             flush(false);
         }
@@ -94,10 +94,10 @@ public class BaseNCodecOutputStream exte
      *             if an I/O error occurs.
      */
     private void flush(boolean propogate) throws IOException {
-        int avail = basedCodec.avail();
+        int avail = baseNCodec.avail();
         if (avail > 0) {
             byte[] buf = new byte[avail];
-            int c = basedCodec.readResults(buf, 0, avail);
+            int c = baseNCodec.readResults(buf, 0, avail);
             if (c > 0) {
                 out.write(buf, 0, c);
             }
@@ -126,9 +126,9 @@ public class BaseNCodecOutputStream exte
     public void close() throws IOException {
         // Notify encoder of EOF (-1).
         if (doEncode) {
-            basedCodec.encode(singleByte, 0, -1);
+            baseNCodec.encode(singleByte, 0, -1);
         } else {
-            basedCodec.decode(singleByte, 0, -1);
+            baseNCodec.decode(singleByte, 0, -1);
         }
         flush();
         out.close();



Mime
View raw message