Java Base64 Base64(String msg)

Here you can find the source of Base64(String msg)

Description

Base

License

Open Source License

Declaration

public static String Base64(String msg) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;
import sun.misc.BASE64Decoder;

public class Main {
    public static String Base64(String msg) {
        BASE64Decoder decoder = new BASE64Decoder();
        byte[] byteData = null;
        String clearText = "";
        try {//from  w  w w  .j a v a  2 s.  co m
            byteData = decoder.decodeBuffer(msg);
            clearText = new String(byteData);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return clearText;
    }
}

Related

  1. base64(byte[] buf)
  2. base64(byte[] buff)
  3. base64(byte[] data)
  4. base64(byte[] raw)
  5. base64(final byte[] stringArray)
  6. base64(String string)
  7. base64(String value)
  8. base64Append(StringBuilder sb, int digit, boolean haveNonZero)
  9. base64Append(StringBuilder sb, int digit, boolean haveNonZero)