Java Base64 Decode base64CodeDecode(String fileData)

Here you can find the source of base64CodeDecode(String fileData)

Description

base Code Decode

License

Open Source License

Declaration

public static byte[] base64CodeDecode(String fileData) 

Method Source Code

//package com.java2s;
/**// ww  w.  j  ava2 s  .c o m
 * Program  : CommonsFiend.java
 * Author   : niehai
 * Create   : 2008-5-14 ????05:05:54
 *
 * Copyright 2007 by Embedded Internet Solutions Inc.,
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Embedded Internet Solutions Inc.("Confidential Information").
 * You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement
 * you entered into with Embedded Internet Solutions Inc.
 *
 */

import java.io.IOException;

import sun.misc.BASE64Decoder;

public class Main {

    public static byte[] base64CodeDecode(String fileData) {
        if (fileData == null) {
            return null;
        }
        BASE64Decoder decoder = new BASE64Decoder();
        try {
            return decoder.decodeBuffer(fileData);
        } catch (IOException e) {
            e.printStackTrace();
            System.out.println(e.toString());
        }
        return null;
    }
}

Related

  1. Base64Decode(byte[] base64Data)
  2. base64Decode(byte[] data)
  3. base64Decode(byte[] textBytes)
  4. base64Decode(char[] a_data)