Differentiate between exosmosis and endosmosis with the help of an example?

Differentiate between exosmosis and endosmosis with the help of an example?