DryRunKeyStore
public
class
DryRunKeyStore
extends Object
implements
IKeyStoreClient
| java.lang.Object | |
| ↳ | com.android.tradefed.util.keystore.DryRunKeyStore |
模擬測試的 KeyStore,其中任何 KeyStore 值一律會正確取代及找到。
摘要
公用建構函式 | |
|---|---|
DryRunKeyStore()
|
|
公用方法 | |
|---|---|
boolean
|
containsKey(String key)
檢查金鑰存放區是否包含特定金鑰的方法。 |
String
|
fetchKey(String key)
用於在金鑰庫中擷取指定金鑰的方法。 |
String
|
fetchKey(String key, String optionType)
模擬測試 KeyStore 的特殊回呼,用於建立預期類型的值。 |
boolean
|
isAvailable()
檢查是否有有效的金鑰存放區可用來通訊的方法。 |
公用建構函式
DryRunKeyStore
public DryRunKeyStore ()
公用方法
containsKey
public boolean containsKey (String key)
檢查金鑰庫是否包含特定金鑰的方法。
| 參數 | |
|---|---|
key |
String:用於檢查是否存在。 |
| 傳回 | |
|---|---|
boolean |
如果指定的鍵存在,則傳回 true。 |
fetchKey
public String fetchKey (String key)
在金鑰庫中擷取指定金鑰的方法。
| 參數 | |
|---|---|
key |
String:在金鑰儲存庫中擷取。 |
| 傳回 | |
|---|---|
String |
鍵的 String 值。如果找不到鍵,則會傳回空值。 |
fetchKey
public String fetchKey (String key,
String optionType)模擬測試的 KeyStore 專用回呼,用於建立預期類型的值。
| 參數 | |
|---|---|
key |
String:選項的鍵,將遭到忽略。 |
optionType |
String:預期的傳回類型。 |
| 傳回 | |
|---|---|
String |
|
isAvailable
public boolean isAvailable ()
用於檢查是否有可用來通訊的有效金鑰庫。
| 傳回 | |
|---|---|
boolean |
如果我們有有效的鍵值儲存庫,則傳回 true,否則傳回 false。 |