List of usage examples for org.bouncycastle.bcpg PublicKeyPacket encode
public void encode(BCPGOutputStream out) throws IOException
From source file:de.dentrassi.pm.signing.pgp.internal.PgpSigningService.java
License:Open Source License
@Override public void printPublicKey(final OutputStream out) throws IOException { final ArmoredOutputStream armoredOutput = new ArmoredOutputStream(out); final PublicKeyPacket pubKey = this.privateKey.getPublicKeyPacket(); pubKey.encode(new BCPGOutputStream(armoredOutput)); armoredOutput.close();//from w w w. j a v a2s .co m }