commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Davies (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CODEC-59) Add methods to Base64 which work with String instead of byte[]
Date Mon, 27 Jul 2009 18:47:15 GMT

    [ https://issues.apache.org/jira/browse/CODEC-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735706#action_12735706
] 

Julius Davies commented on CODEC-59:
------------------------------------

Attached patch introduces following "String" methods to Base64.java:

Non-Static methods:
-------------------------------
1. public byte[] decode(String pArray)
2. public String encodeToString(byte[] pArray) {

Static methods:
-------------------------------
3. public static byte[] decodeBase64(String base64String)
4. public static String encodeBase64String(byte[] binaryData)
5. public static String encodeBase64URLSafeString(byte[] binaryData)


The patch can only be applied after both of the CODEC-81 patches have been applied.

> Add methods to Base64 which work with String instead of byte[]
> --------------------------------------------------------------
>
>                 Key: CODEC-59
>                 URL: https://issues.apache.org/jira/browse/CODEC-59
>             Project: Commons Codec
>          Issue Type: Improvement
>            Reporter: Pepijn Schmitz
>            Priority: Minor
>             Fix For: 1.x
>
>         Attachments: codec59-but-only-after-codec81.patch
>
>
> It would be great if the Base64 class had String encode(byte[]) and byte[] decode(String)
methods. The RFC is stated in terms of "characters" for the encoding, so there should be no
problem with unwarranted assumptions with this. Currently everyone is having to convert to
and from Strings themselves.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message