java read public key from keystore

Java
    KeyStore ks = KeyStore.getInstance("AndroidKeyStore");
    ks.load(null);          
    PublicKey publicKey = ks.getCertificate("aliasYouChose").getPublicKey();
Source

Also in Java: