Java Base64 Encode base64encode(final byte[] data)

Here you can find the source of base64encode(final byte[] data)

Description

baseencode

License

Apache License

Declaration

public static String base64encode(final byte[] data) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Base64;

public class Main {
    public static String base64encode(final byte[] data) {

        final Base64.Encoder encoder = Base64.getEncoder();

        return encoder.encodeToString(data);
    }//  w  ww .j a va 2  s. c  o m

    public static String base64encode(final String text) {

        final Base64.Encoder encoder = Base64.getEncoder();

        return encoder.encodeToString(text.getBytes());
    }
}

Related

  1. base64Encode(byte[] in)
  2. base64Encode(byte[] in)
  3. base64Encode(byte[] in)
  4. Base64Encode(byte[] input, boolean addLineBreaks)
  5. base64Encode(byte[] param)
  6. base64Encode(int value)
  7. base64Encode(String _s, String _enc)
  8. base64Encode(String plaintext)
  9. base64Encode(String plainTextString)