/** * Serialize an object into a String. The object is first serialized into a byte array, * which is converted into a String using {@link BaseEncoding#base64()}. * * @param obj A {@link Serializable} object * @return A String representing the input object * @throws IOException if it fails to serialize the object */ public static <T extends Serializable> String serialize(T obj) throws IOException { return serialize(obj, DEFAULT_ENCODING); }