commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient Base64.java
Date Wed, 10 Jul 2002 05:09:16 GMT
dion        2002/07/09 22:09:16

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        Base64.java
  Log:
  Fix for bug 10624
  
  Revision  Changes    Path
  1.9       +10 -10    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Base64.java
  
  Index: Base64.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Base64.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Base64.java	5 Jan 2002 11:15:59 -0000	1.8
  +++ Base64.java	10 Jul 2002 05:09:16 -0000	1.9
  @@ -75,7 +75,7 @@
    * @author Jeffrey Rodriguez
    * @version $Revision$ $Date$
    */
  -final class Base64 {
  +public final class Base64 {
       static private final int  BASELENGTH         = 255;
       static private final int  LOOKUPLENGTH       = 64;
       static private final int  TWENTYFOURBITGROUP = 24;
  @@ -120,7 +120,7 @@
   
       }
   
  -    static boolean isBase64( String isValidString ){
  +    public static boolean isBase64( String isValidString ){
           return( isArrayByteBase64( isValidString.getBytes()));
       }
   
  @@ -131,13 +131,13 @@
       }
   
   
  -    static boolean isArrayByteBase64( byte[] arrayOctect ) {
  +    public static boolean isArrayByteBase64( byte[] arrayOctect ) {
           int length = arrayOctect.length;
           if ( length == 0 ) {
               return true;
           }
           for ( int i=0; i < length; i++ ) {
  -            if ( Base64.isBase64( arrayOctect[i] ) == false)
  +            if ( !Base64.isBase64( arrayOctect[i] ))
                   return false;
           }
           return true;
  @@ -149,7 +149,7 @@
        * @param binaryData Array containing binaryData
        * @return Base64-encoded array
        */
  -    static byte[] encode( byte[] binaryData ) {
  +    public static byte[] encode( byte[] binaryData ) {
   
           int      lengthDataBits    = binaryData.length*EIGHTBIT;
           int      fewerThan24bits   = lengthDataBits%TWENTYFOURBITGROUP;
  @@ -224,7 +224,7 @@
        * @param binaryData Byte array containing Base64 data
        * @return Array containing decoded data.
        */
  -    static byte[] decode( byte[] base64Data ) {
  +    public static byte[] decode( byte[] base64Data ) {
           // Should we throw away anything not in base64Data ?
   
           // handle the edge case, so we don't have to worry about it later
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message