You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2011/02/20 23:14:07 UTC

svn commit: r1072769 - /commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java

Author: ggregory
Date: Sun Feb 20 22:14:07 2011
New Revision: 1072769

URL: http://svn.apache.org/viewvc?rev=1072769&view=rev
Log:
[CODEC-116] Remove deprecated package private method Base64.discardWhitespace(byte[])

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

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java?rev=1072769&r1=1072768&r2=1072769&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java (original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java Sun Feb 20 22:14:07 2011
@@ -679,33 +679,6 @@ public class Base64 extends BaseNCodec {
         return new Base64().decode(base64Data);
     }
 
-    /**
-     * Discards any whitespace from a base-64 encoded block.
-     * 
-     * @param data
-     *            The base-64 encoded data to discard the whitespace from.
-     * @return The data, less whitespace (see RFC 2045).
-     * @deprecated This method is no longer needed
-     */
-    static byte[] discardWhitespace(byte[] data) {
-        byte groomedData[] = new byte[data.length];
-        int bytesCopied = 0;
-        for (int i = 0; i < data.length; i++) {
-            switch (data[i]) {
-                case ' ' :
-                case '\n' :
-                case '\r' :
-                case '\t' :
-                    break;
-                default :
-                    groomedData[bytesCopied++] = data[i];
-            }
-        }
-        byte packedData[] = new byte[bytesCopied];
-        System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
-        return packedData;
-    }
-
     // Implementation of the Encoder Interface
 
     // Implementation of integer encoding used for crypto