}
encoded = new DERSequence(v);
}
else
throw new CertificateEncodingException( "unsupported encoding" );
if ( encoded == null )
return null;
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
DEROutputStream derOutStream = new DEROutputStream(outStream);
try {
derOutStream.writeObject( encoded );
derOutStream.close();
} catch ( IOException ex ) {
throw new CertificateEncodingException( "IOExeption thrown: " + ex.toString() );
}
return outStream.toByteArray();
}