私は PEMReader を使用していますが、このコードは機能しません。
protected static KeyPair doReadKeyPair(InputStream is) throws Exception {
PemReader r = new PemReader(new InputStreamReader(is));
return (KeyPair) r.readObject();
}
エラー:
This method readObject is undefined forfor the type PemReader.
しかし、多くの Web サイトでこの解決策を見たのに、なぜ私ではなく、それらの Web サイトで機能するのでしょうか?