Do a google search for java io and java encryption. Should be pretty straight forward. Once you have done some research and tried coding, feel free to ask some specific questions if you get stuck. Good luck.

d coding, feel free to ask some specific questions

Theres a whole lot of theory and multiple methods of encryption and decryption, including the most efficient to safest and so on. So your question is kind of vague. You also dont state whether you want to only learn how to encrypt images or whether you just need the fucntionality of encrypting without learning how to write an ecrypter. If it is the latter then there are librarys native in java to provide such functionality :
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.CipherOutputStream;

... and most other imports in that package are related to encryption, however will require some reading on its methods to learn how to use. A good place to start would be here :
if you havent already googled and found it.

As for a working example the closest too a working one i found was :

however, its not exactly an extensive example or by any means reveal the full use of what you'd really want. Id recommend mainly studying the crypto package and its methods and become familiar with some of the standard encryption algorithms if you are really interested in such things, if you just need the methods existing in java its probably not an area you'd want to spend a lot of time studying.

This article has been dead for over six months. Start a new discussion instead.