/** * Decode the given String into an AEL Message object. * * @param string string to be decoded. * @return the decoded message as an Message object. */ @Override public Message decode( String string ) throws DecodeException { try { byte[] data = EncodeUtil.decodeBase64Zipped( string ); InputStream is = new ByteArrayInputStream( data ); ObjectInputStream ois = new ObjectInputStream( is ); Object o = ois.readObject(); ois.close(); return (Message) o; } catch ( Exception e ) { throw new RuntimeException( "Unexpected error trying to decode object.", e ); } }