commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1072769 - /commons/proper/codec/trunk/src/java/org/apache/commons/codec/binary/Base64.java
Date Sun, 20 Feb 2011 22:14:07 GMT
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



Mime
View raw message