Example usage for org.bouncycastle.bcpg UserAttributeSubpacket encode

List of usage examples for org.bouncycastle.bcpg UserAttributeSubpacket encode

Introduction

In this page you can find the example usage for org.bouncycastle.bcpg UserAttributeSubpacket encode.

Prototype

public void encode(OutputStream out) throws IOException 

Source Link

Usage

From source file:org.sufficientlysecure.keychain.pgp.WrappedUserAttribute.java

License:Open Source License

public byte[] getEncoded() throws IOException {
    UserAttributeSubpacket[] subpackets = mVector.toSubpacketArray();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    for (UserAttributeSubpacket subpacket : subpackets) {
        subpacket.encode(out);
    }//from w  w  w.j  ava 2  s. com
    return out.toByteArray();
}