i have one alg in java which is encript the value
The decript code will have to match the encript code. I don't think you can encript something with one algorithm and decript it with another and end up with the original object.
There have been other posts on this topic. Use search to find them.