Here you can find the source of base64ToByte(String data)
Parameter | Description |
---|---|
data | String The base64 representation |
Parameter | Description |
---|---|
IOException | an exception |
public static byte[] base64ToByte(String data) throws IOException
//package com.java2s; //License from project: Apache License import sun.misc.BASE64Decoder; import java.io.IOException; public class Main { /**/*from w w w .ja v a 2 s .c o m*/ * From a base 64 representation, returns the corresponding byte[] * @param data String The base64 representation * @return byte[] * @throws IOException */ public static byte[] base64ToByte(String data) throws IOException { BASE64Decoder decoder = new BASE64Decoder(); return decoder.decodeBuffer(data); } }