public void encode(DerOutputStream out) throws IOException {
  DerOutputStream tagged=new DerOutputStream();
  if ((fullName != null) || (relativeName != null)) {
    DerOutputStream distributionPoint=new DerOutputStream();
    if (fullName != null) {
      DerOutputStream derOut=new DerOutputStream();
      fullName.encode(derOut);
      distributionPoint.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT,true,TAG_FULL_NAME),derOut);
    }
 else     if (relativeName != null) {
      DerOutputStream derOut=new DerOutputStream();
      relativeName.encode(derOut);
      distributionPoint.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT,true,TAG_REL_NAME),derOut);
    }
    tagged.write(DerValue.createTag(DerValue.TAG_CONTEXT,true,TAG_DIST_PT),distributionPoint);
  }
  if (reasonFlags != null) {
    DerOutputStream reasons=new DerOutputStream();
    BitArray rf=new BitArray(reasonFlags);
    reasons.putTruncatedUnalignedBitString(rf);
    tagged.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT,false,TAG_REASONS),reasons);
  }
  if (crlIssuer != null) {
    DerOutputStream issuer=new DerOutputStream();
    crlIssuer.encode(issuer);
    tagged.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT,true,TAG_ISSUER),issuer);
  }
  out.write(DerValue.tag_Sequence,tagged);
}

public void encode ( DerOutputStream out ) throws IOException { DerOutputStream tagged = new DerOutputStream ( ) ; if ( ( fullName != null ) || ( relativeName != null ) ) { DerOutputStream distributionPoint = new DerOutputStream ( ) ; if ( fullName != null ) { DerOutputStream derOut = new DerOutputStream ( ) ; fullName . encode ( derOut ) ; distributionPoint . writeImplicit ( DerValue . createTag ( DerValue . TAG_CONTEXT , true , TAG_FULL_NAME ) , derOut ) ; } else if ( relativeName != null ) { DerOutputStream derOut = new DerOutputStream ( ) ; relativeName . encode ( derOut ) ; distributionPoint . writeImplicit ( DerValue . createTag ( DerValue . TAG_CONTEXT , true , TAG_REL_NAME ) , derOut ) ; } tagged . write ( DerValue . createTag ( DerValue . TAG_CONTEXT , true , TAG_DIST_PT ) , distributionPoint ) ; } if ( reasonFlags != null ) { DerOutputStream reasons = new DerOutputStream ( ) ; BitArray rf = new BitArray ( reasonFlags ) ; reasons . putTruncatedUnalignedBitString ( rf ) ; tagged . writeImplicit ( DerValue . createTag ( DerValue . TAG_CONTEXT , false , TAG_REASONS ) , reasons ) ; } if ( crlIssuer != null ) { DerOutputStream issuer = new DerOutputStream ( ) ; crlIssuer . encode ( issuer ) ; tagged . writeImplicit ( DerValue . createTag ( DerValue . TAG_CONTEXT , true , TAG_ISSUER ) , issuer ) ; } out . write ( DerValue . tag_Sequence , tagged ) ; }
write the distributionpoint value to the deroutputstream .
