public void encode ( OutputStream out ) throws IOException { // Nothing for default if ( version == V1 ) { return ; } DerOutputStream tmp = new DerOutputStream ( ) ; tmp . putInteger ( version ) ; DerOutputStream seq = new DerOutputStream ( ) ; seq . write ( DerValue . createTag ( DerValue . TAG_CONTEXT , true , ( byte ) 0 ) , tmp ) ; out . write ( seq . toByteArray ( ) ) ; }
Encode the CertificateVersion period in DER form to the stream .