Skip to content

Commit 8c6b42a

Browse files
committed
[#CODEC-75] Make Base64 URL-safe. Remove unused method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@794480 13f79535-47bb-0310-9956-ffa450edef68
1 parent a2ce0a8 commit 8c6b42a

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/java/org/apache/commons/codec/binary/Base64.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -792,26 +792,6 @@ private static boolean isWhiteSpace(byte byteToCheck) {
792792
}
793793
}
794794

795-
/**
796-
* Discards any characters outside of the base64 alphabet, per the requirements on page 25 of RFC 2045 - "Any
797-
* characters outside of the base64 alphabet are to be ignored in base64 encoded data."
798-
*
799-
* @param data
800-
* The base-64 encoded data to groom
801-
* @return The data, less non-base64 characters (see RFC 2045).
802-
*/
803-
static byte[] discardNonBase64(byte[] data) {
804-
byte groomedData[] = new byte[data.length];
805-
int bytesCopied = 0;
806-
for (int i = 0; i < data.length; i++) {
807-
if (isBase64(data[i])) {
808-
groomedData[bytesCopied++] = data[i];
809-
}
810-
}
811-
byte packedData[] = new byte[bytesCopied];
812-
System.arraycopy(groomedData, 0, packedData, 0, bytesCopied);
813-
return packedData;
814-
}
815795

816796
// Implementation of the Encoder Interface
817797

0 commit comments

Comments
 (0)