You can try to call the JAVA API of BouncyCastle.org.
Its documentation mentions:
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms.
You have here an example of openpgp ByteArrayHandler.
There might be some incompatibility between BouncyCastle encryption and GnuGP encryption though, since BouncyCastle does not use GnuPG, but rather implements OpenPGP (RFC2440) in Java.