将一个字符串从php传递给java

I have a situation like this.

Some of my data was compressed using gzdeflate() function in php and stored in the database. Now I need to do some work with the data stored in database. I tried a lot of options in Java(including GZipStream, Inflater etc) but was unable to retrieve the data from database.

So I thought of using gzinflate() function in php and was able to retrieve the data quite easily. Now I have the data in a variable in php which I want to pass back to my java program so that I can continue with my previous work.

I have come across some of the options like Java/PHP bridge, Caurces and all but couldn't find a way either.

Is there a way which can solve this requirement of mine. I am stuck in this part for a while now and would really appreciate your help.

Try JZlib library to decompress using java. JZlib can inflate data deflated by zlib.