Java XML Base64 Encode Decode base64Encode(byte[] bytes)

Here you can find the source of base64Encode(byte[] bytes)

Description

base Encode

License

Apache License

Declaration

public static String base64Encode(byte[] bytes) 

Method Source Code

//package com.java2s;
/*//from   ww w  . j a va 2  s .co  m
 * Copyright 2012-2014 Netherlands eScience Center.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at the following location:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * For the full license, see: LICENSE.txt (located in the root folder of this distribution).
 * ---
 */

public class Main {
    public static String base64Encode(byte[] bytes) {
        return javax.xml.bind.DatatypeConverter.printBase64Binary(bytes);
    }
}

Related

  1. base64Decode(String base64)
  2. base64decode(String base64Content)
  3. base64Decode(String property)
  4. base64en(String string)
  5. base64Encode(byte[] bytes)
  6. base64Encode(byte[] bytes)
  7. base64encode(byte[] bytes, boolean pad)
  8. base64Encode(String data)
  9. base64EncodeBasicCredentials(String username, String password)