public RawPublicKeyIdentity(PublicKey key){
  if (key == null) {
    throw new NullPointerException("Public key must not be null");
  }
 else {
    this.publicKey=key;
    createNamedInformationUri(publicKey.getEncoded());
  }
}

public RawPublicKeyIdentity ( PublicKey key ) { if ( key == null ) { throw new NullPointerException ( "Public key must not be null" ) ; } else { this . publicKey = key ; createNamedInformationUri ( publicKey . getEncoded ( ) ) ; } }
creates a new instance for a given public key .
