sir
i would like to know how to encrypt
an image in java (the classes and how to proceed)

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 :
http://docs.oracle.com/javase/1.4.2/docs/guide/security/jce/JCERefGuide.html
if you havent already googled and found it.

As for a working example the closest too a working one i found was :
http://en.allexperts.com/q/Java-1046/2008/12/Reg-Image-Encryption-Decryption.htm

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.