use of java.util.Vector in project robovm by robovm.
the class NoSuchElementExceptionTest method test_Constructor.
/**
* java.util.NoSuchElementException#NoSuchElementException()
*/
public void test_Constructor() {
// Test for method java.util.NoSuchElementException()
assertNotNull(new NoSuchElementException());
try {
Vector v = new Vector();
v.elements().nextElement();
fail("NoSuchElementException expected");
} catch (NoSuchElementException e) {
//expected
}
}
use of java.util.Vector in project robovm by robovm.
the class X509KeyManagerImpl method getServerAliases.
public String[] getServerAliases(String s, Principal[] aprincipal) {
if (s == null || s.equals("")) {
return null;
}
try {
if (s.equals(server)) {
Enumeration<String> aliase = keyTest.aliases();
Vector vec = new Vector();
int i = 0;
while (aliase.hasMoreElements()) {
vec.addElement(aliase.nextElement());
i++;
}
String[] res = new String[vec.size()];
for (i = 0; i < vec.size(); i++) {
res[i] = vec.elementAt(i).toString();
}
return res;
} else
return null;
} catch (Exception ex) {
throw new IllegalArgumentException(ex.getMessage());
}
}
use of java.util.Vector in project robovm by robovm.
the class X509KeyManagerImpl method getClientAliases.
public String[] getClientAliases(String s, Principal[] aprincipal) {
if (s == null || s.equals("")) {
return null;
}
try {
if (s.equals(client)) {
Enumeration<String> aliase = keyTest.aliases();
Vector vec = new Vector();
int i = 0;
while (aliase.hasMoreElements()) {
vec.addElement(aliase.nextElement());
i++;
}
String[] res = new String[vec.size()];
for (i = 0; i < vec.size(); i++) {
res[i] = vec.elementAt(i).toString();
}
return res;
} else
return null;
} catch (Exception ex) {
throw new IllegalArgumentException(ex.getMessage());
}
}
use of java.util.Vector in project robovm by robovm.
the class mySSLSession method getValueNames.
public String[] getValueNames() {
Vector vector = new Vector();
Enumeration enumeration = table.keys();
while (enumeration.hasMoreElements()) {
vector.addElement(enumeration.nextElement());
}
String[] as = new String[vector.size()];
vector.copyInto(as);
return as;
}
use of java.util.Vector in project robovm by robovm.
the class Support_Format method findFields.
/**
* finds attributes with regards to char index in this
* AttributedCharacterIterator, and puts them in a vector
*
* @param iterator
* @return a vector, each entry in this vector are of type FieldContainer ,
* which stores start and end indexes and an attribute this range
* has
*/
protected static Vector<FieldContainer> findFields(AttributedCharacterIterator iterator) {
Vector<FieldContainer> result = new Vector<FieldContainer>();
while (iterator.getIndex() != iterator.getEndIndex()) {
int start = iterator.getRunStart();
int end = iterator.getRunLimit();
Iterator<Attribute> it = iterator.getAttributes().keySet().iterator();
while (it.hasNext()) {
AttributedCharacterIterator.Attribute attribute = it.next();
Object value = iterator.getAttribute(attribute);
result.add(new FieldContainer(start, end, attribute, value));
// System.out.println(start + " " + end + ": " + attribute + ",
// " + value );
// System.out.println("v.add(new FieldContainer(" + start +"," +
// end +"," + attribute+ "," + value+ "));");
}
iterator.setIndex(end);
}
return result;
}
Aggregations