Java examples for java.lang:String Base64
decode Base64 string via java.util.Base64
//package com.java2s; import java.nio.charset.Charset; import java.util.Base64; public class Main { public static void main(String[] argv) throws Exception { String encodedValue = "java2s.com"; System.out.println(java.util.Arrays.toString(decode(encodedValue))); }// ww w. ja v a 2 s.co m public static String[] decode(String encodedValue) { String decodedValue = new String(Base64.getDecoder().decode( encodedValue), Charset.forName("UTF-8")); return decodedValue.split(":"); } }