-2
的我怎麼能在JRuby中表達這種java代碼:的JRuby等價的Java代碼
// Convert the store to a certificate chain
CertStore store = response.getCertStore();
Collection<? extends Certificate> certs = store
.getCertificates(null);
Certificate[] chain = new Certificate[certs.size()];
int i = 0;
for (Certificate certificate : certs) {
chain[i++] = certificate;
}
我有「商店」內JRuby和其識別爲一個集合。
例如
puts store.type
#Collection
到目前爲止你有什麼? –
我試圖把store.get_certificates(/安全/),但我得到以下類型錯誤:TypeError:無法將Java :: SunSecurityX509 :: X509CertImpl轉換爲字符串 – user1513388