Searched refs:keys (Results 1 - 25 of 62) sorted by relevance

123

/libcore/luni/src/main/java/java/io/
H A DSerializationHandleMap.java28 private Object[] keys; field in class:SerializationHandleMap
45 Object[] oldKeys = keys;
48 this.keys = new Object[newSize];
55 int index = findIndex(key, keys);
56 keys[index] = key;
63 int index = findIndex(key, keys);
64 if (keys[index] == key) {
99 int index = findIndex(_key, keys);
102 if (keys[index] != _key) {
105 index = findIndex(_key, keys);
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/x509/
H A DExtendedKeyUsage.java46 private List<String> keys; field in class:ExtendedKeyUsage
60 if (keys == null) {
61 keys = (List<String>) ASN1.decode(getEncoded());
63 return keys;
68 encoding = ASN1.encode(keys);
75 if (keys == null) {
77 keys = getExtendedKeyUsage();
85 for (Iterator<?> it = keys.iterator(); it.hasNext();) {
/libcore/luni/src/test/java/tests/security/interfaces/
H A DDSAPublicKeyTest.java39 KeyPair keys = null;
48 keys = keyGen.generateKeyPair();
49 priv = (DSAPrivateKey) keys.getPrivate();
50 publ = (DSAPublicKey) keys.getPublic();
56 keys = keyGen.generateKeyPair();
57 priv = (DSAPrivateKey) keys.getPrivate();
58 publ = (DSAPublicKey) keys.getPublic();
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DListResourceBundleTest.java35 Enumeration<String> keys = bundle.getKeys();
37 while (keys.hasMoreElements()) {
38 result.addElement(keys.nextElement());
54 Enumeration keys = bundle.getKeys();
57 while (keys.hasMoreElements()) {
58 result.addElement(bundle.handleGetObject((String)keys.nextElement()));
H A DWeakHashMapTest.java185 List keys = Arrays.asList(keyArray);
193 assertTrue("Invalid map entry returned--bad key", keys
198 keys = null;
300 List keys = Arrays.asList(keyArray);
304 assertEquals("Incorrect number of keys returned,", 100, keySet.size());
308 assertTrue("Invalid map entry returned--bad key", keys
311 keys = null;
323 assertEquals("Incorrect number of keys returned after gc,", 99, keySet
377 List keys = Arrays.asList(keyArray);
381 assertEquals("Incorrect number of keys returne
[all...]
H A DHashtableTest.java144 Enumeration keys = h.keys();
146 && !(keys.hasMoreElements()));
159 Enumeration org = htfull.keys();
160 Enumeration cpy = h.keys();
169 assertTrue("Copy has more keys than original", !cpy.hasMoreElements());
241 assertEquals("All keys not retrieved", 10, ht10.size());
417 * java.util.Hashtable#keys()
420 // Test for method java.util.Enumeration java.util.Hashtable.keys()
422 Enumeration keys
[all...]
H A DPropertyResourceBundleTest.java115 assertEquals("Returned the wrong number of keys", 2, keyCount);
116 assertTrue("Returned the wrong keys", test.contains("p1")
186 Enumeration<String> keys = localPrb.getKeys();
188 while (keys.hasMoreElements()) {
189 contents.add(keys.nextElement());
/libcore/luni/src/main/java/org/apache/harmony/security/
H A DSystemScope.java47 private Hashtable keys = new Hashtable(); field in class:SystemScope
94 return (Identity) keys.get(key);
111 if (key != null && keys.containsKey(key)) {
117 keys.put(key, identity);
143 contains = contains || keys.containsKey(key);
144 keys.remove(key);
/libcore/luni/src/main/java/java/util/
H A DDictionary.java25 * associate keys with values, such as {@code Hashtable}.
41 * @see #keys
68 * Returns an enumeration on the keys of this dictionary.
70 * @return an enumeration of the keys of this dictionary.
75 public abstract Enumeration<K> keys(); method in class:Dictionary
90 * @see #keys
112 * @see #keys
H A DEnumMap.java26 * An {@code Map} specialized for use with {@code Enum} types as keys.
39 transient Enum[] keys; field in class:EnumMap
87 return (enumMap.keys[ordinal] == null ? 0 : enumMap.keys[ordinal]
97 return (KT) enumMap.keys[ordinal];
111 return enumMap.put((KT) enumMap.keys[ordinal], value);
116 StringBuilder result = new StringBuilder(enumMap.keys[ordinal]
162 return type.get(new MapEntry(enumMap.keys[prePosition],
169 enumMap.remove(enumMap.keys[prePosition]);
181 new MapEntry(enumMap.keys[prePositio
[all...]
/libcore/luni/src/test/java/tests/security/spec/
H A DEncodedKeySpec2Test.java42 KeyPair keys = keyGen.generateKeyPair();
49 byte[] encoded = keys.getPublic().getEncoded();
53 isEqual(key, keys.getPublic()));
56 encoded = keys.getPrivate().getEncoded();
60 isEqual(key, keys.getPrivate()));
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
H A DKeyPairGenerator1Test.java349 int[] keys = { -10000, -1024, -1, 0, 10000 };
357 for (int j = 0; j < keys.length; j++) {
359 kpg[i].initialize(keys[j]);
360 kpg[i].initialize(keys[j], random);
386 int[] keys = { -1, -250, 1, 64, 512, 1024 };
396 for (int i = 0; i < keys.length; i++) {
398 mKPG.initialize(keys[i]);
400 + Integer.toString(keys[i]) + ")");
404 mKPG.initialize(keys[i], random);
406 + Integer.toString(keys[
[all...]
H A DKeyFactory2Test.java117 KeyPair keys = keyGen.generateKeyPair();
122 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(),
126 Arrays.toString(keys.getPrivate().getEncoded()),
128 privateKey = fact.generatePrivate(new PKCS8EncodedKeySpec(keys.getPrivate().getEncoded()));
130 Arrays.toString(keys.getPrivate().getEncoded()),
147 KeyPair keys = keyGen.generateKeyPair();
151 KeySpec publicKeySpec = fact.getKeySpec(keys.getPublic(),
158 Arrays.toString(keys.getPublic().getEncoded()),
239 KeyPair keys = keyGen.generateKeyPair();
243 KeySpec privateKeySpec = fact.getKeySpec(keys
[all...]
H A DKeyFactoryTest.java286 Key[] keys = {
300 for (int i = 0; i < keys.length; i++) {
301 Key key = keys[i];
315 Key[] keys = {
336 for (int i = 0; i < keys.length; i++) {
337 Key key = keys[i];
368 Key[] keys = {
378 for (int i = 0; i < keys.length; i++) {
379 Key key = keys[i];
392 Key[] keys
[all...]
/libcore/luni/src/main/java/java/nio/channels/
H A DSelector.java27 * {@link SelectionKey} that represents the registration. The keys are also
28 * added to the selector's key set. Selection keys can be canceled so that the
31 * By invoking the {@code select} method, the key set is checked and all keys
33 * canceled keys. During the select operation, the channels registered with this
59 * {@link #wakeup()} method of this selector is called. After this, all keys
81 * Gets the set of registered keys. The set is immutable and is not thread-
84 * @return the set of registered keys.
86 public abstract Set<SelectionKey> keys(); method in class:Selector
130 * Gets the selection keys whose channels are ready for operation. The set
131 * is not thread-safe and no keys ma
[all...]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
H A DCipherPBEThread.java30 CipherPBEThread(String name, int[] keys, String[] modes, String[] paddings) { argument
31 super(name, keys, modes, paddings);
H A DCipherRSAThread.java26 CipherRSAThread(String name, int[] keys, String[] modes, String[] paddings) { argument
27 super(name, keys, modes, paddings);
H A DCipherWrapThread.java26 CipherWrapThread(String name, int[] keys, String[] modes, String[] paddings) { argument
27 super(name, keys, modes, paddings);
H A DCipherSymmetricKeyThread.java28 CipherSymmetricKeyThread(String name, int[] keys, String[] modes, String[] paddings) { argument
29 super(name, keys, modes, paddings);
/libcore/json/src/test/java/org/json/
H A DJSONArrayTest.java325 JSONArray keys = new JSONArray();
326 keys.put("a");
327 keys.put("b");
333 JSONObject object = values.toJSONObject(keys);
337 keys.put(0, "a");
343 JSONArray keys = new JSONArray();
344 keys.put("a");
345 keys.put("b");
352 JSONObject object = values.toJSONObject(keys);
359 JSONArray keys
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
H A DHandshakeCompletedEventTest.java393 String keys; field in class:HandshakeCompletedEventTest.TestServer
399 public TestServer(boolean provideKeys, int clientAuth, String keys) throws Exception { argument
400 this.keys = keys;
406 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null;
476 private String keys; field in class:HandshakeCompletedEventTest.TestClient
480 public TestClient(boolean provideKeys, String keys) { argument
481 this.keys = keys;
489 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys)
539 getKeyManagers(String keys) argument
[all...]
H A DSSLSessionTest.java490 String keys; field in class:SSLSessionTest.TestServer
498 public TestServer(boolean provideKeys, int clientAuth, String keys) throws Exception { argument
499 this.keys = keys;
505 store = provideKeys ? getKeyStore(keys) : null;
573 private String keys; field in class:SSLSessionTest.TestClient
579 public TestClient(boolean provideKeys, String keys) { argument
580 this.keys = keys;
588 store = provideKeys ? getKeyStore(keys)
634 getKeyStore(String keys) argument
[all...]
H A DSSLSocketTest.java485 String keys = useBKS ? SERVER_KEYS_BKS : SERVER_KEYS_JKS;
486 TestServer server = new TestServer(true, keys);
521 String keys; field in class:SSLSocketTest.TestServer
527 public TestServer(boolean provideKeys, String keys) { argument
528 this.keys = keys;
536 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null;
589 private KeyManager[] getKeyManagers(String keys) throws Exception { argument
590 byte[] bytes = Base64.decode(keys.getBytes());
/libcore/luni/src/main/java/java/util/prefs/
H A DXMLParser.java212 String[] keys = prefs.keys();
213 String[] values = new String[keys.length];
214 for (int i = 0; i < keys.length; i++) {
215 values[i] = prefs.get(keys[i], null);
217 exportEntries(keys, values, out);
220 private static void exportEntries(String[] keys, String[] values, argument
222 if (keys.length == 0) {
227 for (int i = 0; i < keys.length; i++) {
230 new String[] { keys[
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
H A DFilePreferencesImplTest.java53 String[] names = uroot.keys();
60 names = uroot.keys();
65 names = uroot.keys();

Completed in 594 milliseconds

123