Wrapped translucency-related code into try-catch to let it work ok in
Java 6. Added proper closing haindling.