blob: 75964559c39ed830af4bd28fe6a7927c3f17c373 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package org.spongycastle.bcpg;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
* Basic type for a PGP packet.
*/
public abstract class ContainedPacket
extends Packet
{
public byte[] getEncoded()
throws IOException
{
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
BCPGOutputStream pOut = new BCPGOutputStream(bOut);
pOut.writePacket(this);
return bOut.toByteArray();
}
public abstract void encode(
BCPGOutputStream pOut)
throws IOException;
}
|