* @throws IOException DOCUMENT ME!
*/
public byte[] getEncoded() throws ASN1Exception, IOException
{
ByteArrayOutputStream out;
DEREncoder encoder;
byte[] encodedAsn1Object;
/* Initialize an output stream to which the encoded data will be
* written.
*/
out = new ByteArrayOutputStream();
/* Initialize encoder instance with this output stream.
*/
encoder = new DEREncoder(out);
/* Encoder reads the data stored in the member variables of this class
* and encodes it writing the output to the output stream.
*/
this.encode(encoder);
/* Store the data in the output stream in a byte array. This array will
* be returned by this method.
*/
encodedAsn1Object = out.toByteArray();
/* Close the stream.
*/
encoder.close();
/* Return the encoded data.
*/
return encodedAsn1Object;
}