question: public static String serialize ( Serializable object ) throws JobPersistenceException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( baos ) ; oos . writeObject ( object ) ; oos . flush ( ) ; oos . close ( ) ; return Base64 . encode ( baos . toByteArray ( ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new JobPersistenceException ( e . getMessage ( ) ) ; } }
target:  Converts a serializable object into a String.