Here you can find the source of decodeString(String str)
Parameter | Description |
---|---|
str | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static String decodeString(String str) throws IOException
//package com.java2s; import java.io.IOException; import sun.misc.BASE64Decoder; public class Main { /**/*from w w w . ja v a 2 s .c o m*/ * Decode a string using Base64 encoding. * * @param str * @return String * @throws IOException */ public static String decodeString(String str) throws IOException { BASE64Decoder dec = new BASE64Decoder(); String value = new String(dec.decodeBuffer(str)); return (value); } }