Can any one tell the Best Compression method for all types with Source code in java....

nope. No such thing exists.
If there was a "best for everything" compression algorithm no others would exist.
The very fact that other algorithms do exist and are used proves that there is no "best for everything".
This is a generally true statement.

And even if there was, we'd not just hand you the code. It'd possibly (if it weren't patented) be out there for you to find and we might point you in the right direction so you could find it on your own.