You could simply cast to text
representation:
String query="select geom::text from apmandal where mandalname='"+mname+"'";
Then you can treat it just like any other text.
I quote the PostGIS manual here:
At least as of PostgreSQL 8.3 - Everything can be CAST to text (presumably because of the magical unknown type), so no defined CASTS for that need to be present for you to CAST an object to text.