Here you can find the source of decode(String s)
public static <T extends Serializable> T decode(String s)
//package com.java2s; //License from project: Apache License import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.Base64; public class Main { public static <T extends Serializable> T decode(String s) { byte[] decode = Base64.getDecoder().decode(s); try (ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(decode); ObjectInputStream si = new ObjectInputStream(byteArrayInputStream)) { return (T) si.readObject(); } catch (ClassNotFoundException | IOException e) { throw new UnsupportedOperationException(e); }/*w w w . java 2s. c o m*/ } }